[cfe-commits] r136224 - /cfe/trunk/lib/Serialization/ASTReader.cpp

Douglas Gregor dgregor at apple.com
Wed Jul 27 09:30:07 PDT 2011


Author: dgregor
Date: Wed Jul 27 11:30:06 2011
New Revision: 136224

URL: http://llvm.org/viewvc/llvm-project?rev=136224&view=rev
Log:
Modules don't require validation of the predefines buffer

Modified:
    cfe/trunk/lib/Serialization/ASTReader.cpp

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=136224&r1=136223&r2=136224&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Wed Jul 27 11:30:06 2011
@@ -2560,7 +2560,7 @@
   PreloadSLocEntries.clear();
   
   // Check the predefines buffers.
-  if (!DisableValidation && CheckPredefinesBuffers())
+  if (!DisableValidation && Type != MK_Module && CheckPredefinesBuffers())
     return IgnorePCH;
 
   if (PP) {
@@ -2576,6 +2576,11 @@
     // 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();





More information about the cfe-commits mailing list