diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 03:06:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-17 03:06:44 +0000 |
commit | 865c2a7f23de81681f6948b19cddbd36eabf886a (patch) | |
tree | e18385034eacd9b300c1d2d980de001d80ea980a /clang/lib/Frontend/PCHReader.cpp | |
parent | ac6271e3f4c8a2afff3abc51d770d8973a22c672 (diff) | |
download | bcm5719-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.cpp | 6 |
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) { |