summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-01 22:20:10 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-01 22:20:10 +0000
commitcf68c58afe5dbb92355f53440eb643af393eb8a0 (patch)
tree8710e9d9862653c7cab38b0bc30432af01ac8222 /clang/lib/Serialization/ASTWriter.cpp
parent3367123b1233c7dcabc6ccc80461d76e3170f5cb (diff)
downloadbcm5719-llvm-cf68c58afe5dbb92355f53440eb643af393eb8a0.tar.gz
bcm5719-llvm-cf68c58afe5dbb92355f53440eb643af393eb8a0.zip
Implement name hiding for declarations deserialized from a non-visible
module. When that module becomes visible, so do those declarations. llvm-svn: 145640
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index e37aa7320fe..1b554ef3c45 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/lib/Serialization/ASTWriter.cpp
@@ -2958,6 +2958,10 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls,
Module *WritingModule) {
using namespace llvm;
+ // Make sure that the AST reader knows to finalize itself.
+ if (Chain)
+ Chain->finalizeForWriting();
+
ASTContext &Context = SemaRef.Context;
Preprocessor &PP = SemaRef.PP;
OpenPOWER on IntegriCloud