diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-24 00:05:14 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2013-02-24 00:05:14 +0000 |
commit | c515978bd3a703aa733f846a0094ffa84d149074 (patch) | |
tree | 575f1660e68d74b4268c6a1460f2fbb4245da518 /lib/Lex/Preprocessor.cpp | |
parent | 82a29af8cbc4b117af83c5c5dfa875b5699c97c4 (diff) |
[preprocessor] Use MacroDirective in the preprocessor callbacks to make available the
full information about the macro (e.g if it was imported and where).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175978 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/Preprocessor.cpp')
-rw-r--r-- | lib/Lex/Preprocessor.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/Preprocessor.cpp b/lib/Lex/Preprocessor.cpp index 8209c3c136..af000ec1d1 100644 --- a/lib/Lex/Preprocessor.cpp +++ b/lib/Lex/Preprocessor.cpp @@ -642,10 +642,11 @@ void Preprocessor::HandleIdentifier(Token &Identifier) { } // If this is a macro to be expanded, do it. - if (MacroInfo *MI = getMacroInfo(&II)) { + if (MacroDirective *MD = getMacroDirective(&II)) { + MacroInfo *MI = MD->getInfo(); if (!DisableMacroExpansion) { if (!Identifier.isExpandDisabled() && MI->isEnabled()) { - if (!HandleMacroExpandedIdentifier(Identifier, MI)) + if (!HandleMacroExpandedIdentifier(Identifier, MD)) return; } else { // C99 6.10.3.4p2 says that a disabled macro may never again be |