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

Argyrios Kyrtzidis akyrtzi at gmail.com
Fri Dec 16 20:13:28 PST 2011


Author: akirtzidis
Date: Fri Dec 16 22:13:28 2011
New Revision: 146817

URL: http://llvm.org/viewvc/llvm-project?rev=146817&view=rev
Log:
[PCH] In ASTReader::FinishedDeserializing fully load the interesting decls,
including deserializing their bodies, so that any other declarations that
get referenced in the body will be fully deserialized by the time we pass them to the consumer.

Could not reduce to a test case unfortunately. rdar://10587158.

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=146817&r1=146816&r2=146817&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Fri Dec 16 22:13:28 2011
@@ -6028,6 +6028,15 @@
   assert(NumCurrentElementsDeserializing &&
          "FinishedDeserializing not paired with StartedDeserializing");
   if (NumCurrentElementsDeserializing == 1) {
+
+    // Fully load the interesting decls, including deserializing their bodies,
+    // so that any other declarations that get referenced in the body will be
+    // fully deserialized by the time we pass them to the consumer.
+    for (std::deque<Decl *>::iterator
+           I = InterestingDecls.begin(),
+           E = InterestingDecls.end(); I != E; ++I)
+      (*I)->getBody();
+
     do {
       // If any identifiers with corresponding top-level declarations have
       // been loaded, load those declarations now.





More information about the cfe-commits mailing list