diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-07-27 16:30:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-07-27 16:30:06 +0000 |
commit | a7d445a718906820bf275fbfaedce269a407a6c5 (patch) | |
tree | 13bdef457f627d5339a435b97c2067771ba9b7ee | |
parent | 87dd7d92b3a2598eef4afdde3cda46e1fc23b6e8 (diff) |
Modules don't require validation of the predefines buffer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136224 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 3994fe6b7b..b377be6267 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -2560,7 +2560,7 @@ ASTReader::ASTReadResult ASTReader::ReadAST(const std::string &FileName, PreloadSLocEntries.clear(); // Check the predefines buffers. - if (!DisableValidation && CheckPredefinesBuffers()) + if (!DisableValidation && Type != MK_Module && CheckPredefinesBuffers()) return IgnorePCH; if (PP) { @@ -2576,6 +2576,11 @@ ASTReader::ASTReadResult ASTReader::ReadAST(const std::string &FileName, // since de-serializing declarations or macro definitions can add // new entries into the identifier table, invalidating the // iterators. + // + // FIXME: We need a lazier way to load this information, e.g., by marking + // the identifier data as 'dirty', so that it will be looked up in the + // AST file(s) if it is uttered in the source. This could save us some + // module load time. SmallVector<IdentifierInfo *, 128> Identifiers; for (IdentifierTable::iterator Id = PP->getIdentifierTable().begin(), IdEnd = PP->getIdentifierTable().end(); |