diff options
| author | Douglas Gregor <dgregor@apple.com> | 2012-10-09 16:01:50 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2012-10-09 16:01:50 +0000 |
| commit | 8cb174654fa508a759e11fda7b2ca8c15efe9cae (patch) | |
| tree | 1ba673ed54f793b8fd441868733515bd4cbd4002 /clang/lib/Serialization/ASTReader.cpp | |
| parent | 97e5949068f77dbc0569c9bc9813d789ed4b299b (diff) | |
| download | bcm5719-llvm-8cb174654fa508a759e11fda7b2ca8c15efe9cae.tar.gz bcm5719-llvm-8cb174654fa508a759e11fda7b2ca8c15efe9cae.zip | |
If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.
Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.
llvm-svn: 165502
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
| -rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index ff418caf9ef..05a453143c7 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -1460,6 +1460,8 @@ void ASTReader::setIdentifierIsMacro(IdentifierInfo *II, ModuleFile &F, if (Visible) { // Note that this identifier has a macro definition. II->setHasMacroDefinition(true); + } else { + II->setHadMacroDefinition(true); } // Adjust the offset to a global offset. |

