diff options
author | Craig Silverstein <csilvers2000@yahoo.com> | 2010-11-19 21:33:15 +0000 |
---|---|---|
committer | Craig Silverstein <csilvers2000@yahoo.com> | 2010-11-19 21:33:15 +0000 |
commit | 1a9ca21881cccf4b5f6aaccaf1dad576c133ab7a (patch) | |
tree | 449e356291d024d13e7b32bef8383a0f073585f2 /clang/lib/Lex/PPDirectives.cpp | |
parent | 09f6823eb6438341a0ad78e44479bcafd27510ce (diff) | |
download | bcm5719-llvm-1a9ca21881cccf4b5f6aaccaf1dad576c133ab7a.tar.gz bcm5719-llvm-1a9ca21881cccf4b5f6aaccaf1dad576c133ab7a.zip |
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
llvm-svn: 119845
Diffstat (limited to 'clang/lib/Lex/PPDirectives.cpp')
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 7aa3b31bc73..ee8883b8b26 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/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); } } |