summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-12 01:39:54 +0000
committerChris Lattner <sabre@nondot.org>2009-04-12 01:39:54 +0000
commit928e9096cb65d240b20c43ffdb9decf2f2a4888c (patch)
treec7c5d620f5e968b1af053a9e7b2fb21ef69e0d8f /clang/lib/Lex
parentc523d8e88c94113717f12381cd44c2a3699e9d10 (diff)
downloadbcm5719-llvm-928e9096cb65d240b20c43ffdb9decf2f2a4888c.tar.gz
bcm5719-llvm-928e9096cb65d240b20c43ffdb9decf2f2a4888c.zip
add a ppcallback hook for macro definitions.
llvm-svn: 68883
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r--clang/lib/Lex/PPDirectives.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp
index ba321a7f673..52f673c6d3a 100644
--- a/clang/lib/Lex/PPDirectives.cpp
+++ b/clang/lib/Lex/PPDirectives.cpp
@@ -1402,6 +1402,10 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) {
}
setMacroInfo(MacroNameTok.getIdentifierInfo(), MI);
+
+ // If the callbacks want to know, tell them about the macro definition.
+ if (Callbacks)
+ Callbacks->MacroDefined(MacroNameTok.getIdentifierInfo(), MI);
}
/// HandleUndefDirective - Implements #undef.
OpenPOWER on IntegriCloud