aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-17 04:13:28 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-12-17 04:13:28 +0000
commit71168330e25fdce4c1a3bf46484a2d81e2e21011 (patch)
tree7667bce3adb4a06e55c3b888d2054b8352ccef87
parent672b3232f7b0cc5dc024a7702be1a26885fdea57 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146817 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Serialization/ASTReader.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp
index 81f08e375b..00f7b7ad0e 100644
--- a/lib/Serialization/ASTReader.cpp
+++ b/lib/Serialization/ASTReader.cpp
@@ -6028,6 +6028,15 @@ void ASTReader::FinishedDeserializing() {
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.