aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PreprocessingRecord.cpp
diff options
context:
space:
mode:
authorCraig Silverstein <csilvers2000@yahoo.com>2010-11-19 21:33:15 +0000
committerCraig Silverstein <csilvers2000@yahoo.com>2010-11-19 21:33:15 +0000
commit2aa9267cf193e5eceb9fd24a51b51c031b606fe9 (patch)
treec82fdac0bd4e44ce6510051d02e146ec51bf4f00 /lib/Lex/PreprocessingRecord.cpp
parente4539ef4633fa5c0867e247b5bc88e0f753a2336 (diff)
Several PPCallbacks take an SourceLocation + IdentifierInfo, rather
than a Token that holds the same information all in one easy-to-use package. There's no technical reason to prefer the former -- the information comes from a Token originally -- and it's clumsier to use, so I've changed the code to use tokens everywhere. Approved by clattner git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119845 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--lib/Lex/PreprocessingRecord.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Lex/PreprocessingRecord.cpp b/lib/Lex/PreprocessingRecord.cpp
index f6036ef779..3a43ac11e4 100644
--- a/lib/Lex/PreprocessingRecord.cpp
+++ b/lib/Lex/PreprocessingRecord.cpp
@@ -127,17 +127,18 @@ void PreprocessingRecord::MacroExpands(const Token &Id, const MacroInfo* MI) {
Def));
}
-void PreprocessingRecord::MacroDefined(const IdentifierInfo *II,
+void PreprocessingRecord::MacroDefined(const Token &Id,
const MacroInfo *MI) {
SourceRange R(MI->getDefinitionLoc(), MI->getDefinitionEndLoc());
MacroDefinition *Def
- = new (*this) MacroDefinition(II, MI->getDefinitionLoc(), R);
+ = new (*this) MacroDefinition(Id.getIdentifierInfo(),
+ MI->getDefinitionLoc(),
+ R);
MacroDefinitions[MI] = Def;
PreprocessedEntities.push_back(Def);
}
-void PreprocessingRecord::MacroUndefined(SourceLocation Loc,
- const IdentifierInfo *II,
+void PreprocessingRecord::MacroUndefined(const Token &Id,
const MacroInfo *MI) {
llvm::DenseMap<const MacroInfo *, MacroDefinition *>::iterator Pos
= MacroDefinitions.find(MI);