summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReaderDecl.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-21 01:30:00 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-09-21 01:30:00 +0000
commit6fa1682368f192f7148392d3136455664aab2f1b (patch)
treee879257299ba3539c45c1feb030e5b49462a0457 /clang/lib/Serialization/ASTReaderDecl.cpp
parent1a38004c1b3f13ad79af443226bf67b2f8d286d2 (diff)
downloadbcm5719-llvm-6fa1682368f192f7148392d3136455664aab2f1b.tar.gz
bcm5719-llvm-6fa1682368f192f7148392d3136455664aab2f1b.zip
[PCH] After deserializing a DeclContext, if it has external lexical decls but not
external visible decls, call DeclContext::setMustBuildLookupTable so that the "lazy decls" bit of the LookupPtr is set. Previously, in non-C++, if there were no new declarations causing the "lazy decls" bit to be set, then DeclContext::lookups_begin() would fail to return the decls from the PCH. Fixes rdar://12316296. llvm-svn: 164351
Diffstat (limited to 'clang/lib/Serialization/ASTReaderDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTReaderDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTReaderDecl.cpp b/clang/lib/Serialization/ASTReaderDecl.cpp
index 754ff36db79..c9788a32164 100644
--- a/clang/lib/Serialization/ASTReaderDecl.cpp
+++ b/clang/lib/Serialization/ASTReaderDecl.cpp
@@ -2127,6 +2127,9 @@ Decl *ASTReader::ReadDeclRecord(DeclID ID) {
}
PendingVisibleUpdates.erase(I);
}
+
+ if (!DC->hasExternalVisibleStorage() && DC->hasExternalLexicalStorage())
+ DC->setMustBuildLookupTable();
}
assert(Idx == Record.size());
OpenPOWER on IntegriCloud