summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PCHReader.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-09-17 03:06:44 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-09-17 03:06:44 +0000
commit865c2a7f23de81681f6948b19cddbd36eabf886a (patch)
treee18385034eacd9b300c1d2d980de001d80ea980a /clang/lib/Frontend/PCHReader.cpp
parentac6271e3f4c8a2afff3abc51d770d8973a22c672 (diff)
downloadbcm5719-llvm-865c2a7f23de81681f6948b19cddbd36eabf886a.tar.gz
bcm5719-llvm-865c2a7f23de81681f6948b19cddbd36eabf886a.zip
PCH: When deserializing an explicit "external definition", don't pass it to HandleTopLevelDecl -- this is already being done inside the reader.
This is something of a hack, since whether the reader actually did this depends on the "isConsumerInterestedIn" predicate. I think we need to rework how this works, but I need to discuss with Doug. llvm-svn: 82111
Diffstat (limited to 'clang/lib/Frontend/PCHReader.cpp')
-rw-r--r--clang/lib/Frontend/PCHReader.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index e7321bf6fab..cd08b135471 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -2129,9 +2129,9 @@ void PCHReader::StartTranslationUnit(ASTConsumer *Consumer) {
return;
for (unsigned I = 0, N = ExternalDefinitions.size(); I != N; ++I) {
- Decl *D = GetDecl(ExternalDefinitions[I]);
- DeclGroupRef DG(D);
- Consumer->HandleTopLevelDecl(DG);
+ // Force deserialization of this decl, which will cause it to be passed to
+ // the consumer (or queued).
+ GetDecl(ExternalDefinitions[I]);
}
for (unsigned I = 0, N = InterestingDecls.size(); I != N; ++I) {
OpenPOWER on IntegriCloud