diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-08-20 05:09:43 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-08-20 05:09:43 +0000 |
commit | b36fc536d226f33a9a20e5828cfad7ed54f71df1 (patch) | |
tree | 2d7c945f59e281314c02eebadb774bea71e030ea /clang/lib/Serialization/ASTReader.cpp | |
parent | 18221d8eaecab91f1b51b86fd18db03b28caab08 (diff) | |
download | bcm5719-llvm-b36fc536d226f33a9a20e5828cfad7ed54f71df1.tar.gz bcm5719-llvm-b36fc536d226f33a9a20e5828cfad7ed54f71df1.zip |
Make the loading of multiple records for the same identifier (from
different modules) more robust. It already handled (simple) merges of
the set of declarations attached to that identifier, so add a test
case that shows us getting two different declarations for the same
identifier (one struct, one function) from different modules, and are
able to use both of them.
llvm-svn: 138189
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r-- | clang/lib/Serialization/ASTReader.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp index 0b13d479705..768d5db7e3f 100644 --- a/clang/lib/Serialization/ASTReader.cpp +++ b/clang/lib/Serialization/ASTReader.cpp @@ -698,7 +698,8 @@ public: assert(II->isExtensionToken() == ExtensionToken && "Incorrect extension token flag"); (void)ExtensionToken; - II->setIsPoisoned(Poisoned); + if (Poisoned) + II->setIsPoisoned(true); assert(II->isCPlusPlusOperatorKeyword() == CPlusPlusOperatorKeyword && "Incorrect C++ operator keyword flag"); (void)CPlusPlusOperatorKeyword; @@ -706,6 +707,7 @@ public: // If this identifier is a macro, deserialize the macro // definition. if (hasMacroDefinition) { + // FIXME: Check for conflicts? uint32_t Offset = ReadUnalignedLE32(d); Reader.SetIdentifierIsMacro(II, F, Offset); DataLen -= 4; |