summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/Pragma.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-09 23:05:51 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-09 23:05:51 +0000
commitcb28f9d7adfc51225fe1553052608e5a5c0442b6 (patch)
tree5428baebc99503de6855f0a418c671d9d7c96527 /clang/lib/Lex/Pragma.cpp
parent79258ca2ccb824371e5720de253f34b5e322b520 (diff)
downloadbcm5719-llvm-cb28f9d7adfc51225fe1553052608e5a5c0442b6.tar.gz
bcm5719-llvm-cb28f9d7adfc51225fe1553052608e5a5c0442b6.zip
Rework the (de-)serialization of macros, as stored in
MacroInfo*. Instead of simply dumping an offset into the current file, give each macro definition a proper ID with all of the standard modules-remapping facilities. Additionally, when a macro is modified in a subsequent AST file (e.g., #undef'ing a macro loaded from another module or from a precompiled header), provide a macro update record rather than rewriting the entire macro definition. This gives us greater consistency with the way we handle declarations, and ties together macro definitions much more cleanly. Note that we're still not actually deserializing macro history (we never were), but it's far easy to do properly now. llvm-svn: 165560
Diffstat (limited to 'clang/lib/Lex/Pragma.cpp')
-rw-r--r--clang/lib/Lex/Pragma.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/Pragma.cpp b/clang/lib/Lex/Pragma.cpp
index b5bc9583f6c..1f9c811f55c 100644
--- a/clang/lib/Lex/Pragma.cpp
+++ b/clang/lib/Lex/Pragma.cpp
@@ -737,7 +737,7 @@ void Preprocessor::HandlePragmaPopMacro(Token &PopMacroTok) {
if (MacroInfo *CurrentMI = getMacroInfo(IdentInfo)) {
if (CurrentMI->isWarnIfUnused())
WarnUnusedMacroLocs.erase(CurrentMI->getDefinitionLoc());
- CurrentMI->setUndefLoc(MessageLoc);
+ UndefineMacro(IdentInfo, CurrentMI, MessageLoc);
}
// Get the MacroInfo we want to reinstall.
OpenPOWER on IntegriCloud