diff options
Diffstat (limited to 'lib/Lex')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 9 | ||||
-rw-r--r-- | lib/Lex/PreprocessingRecord.cpp | 9 |
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index 7aa3b31bc7..ee8883b8b2 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1532,7 +1532,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) { // If the callbacks want to know, tell them about the macro definition. if (Callbacks) - Callbacks->MacroDefined(MacroNameTok.getIdentifierInfo(), MI); + Callbacks->MacroDefined(MacroNameTok, MI); } /// HandleUndefDirective - Implements #undef. @@ -1561,8 +1561,7 @@ void Preprocessor::HandleUndefDirective(Token &UndefTok) { // If the callbacks want to know, tell them about the macro #undef. if (Callbacks) - Callbacks->MacroUndefined(MacroNameTok.getLocation(), - MacroNameTok.getIdentifierInfo(), MI); + Callbacks->MacroUndefined(MacroNameTok, MI); // Free macro definition. ReleaseMacroInfo(MI); @@ -1633,9 +1632,9 @@ void Preprocessor::HandleIfdefDirective(Token &Result, bool isIfndef, if (Callbacks) { if (isIfndef) - Callbacks->Ifndef(MacroNameTok.getLocation(), MII); + Callbacks->Ifndef(MacroNameTok); else - Callbacks->Ifdef(MacroNameTok.getLocation(), MII); + Callbacks->Ifdef(MacroNameTok); } } 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); |