diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:46 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-10-24 17:26:46 +0000 |
commit | ba901b507fc36408fe6f8478e8ac90b554f1d230 (patch) | |
tree | 3519a4dd3e4f6433ea7e19b2c800593d1221c73a /lib | |
parent | aacdd02e5865aa410c1418d7ef77f445b5bb5cba (diff) |
Introduce a DeclsToRewrite field in ASTWrite, used for collecting the decls that will be replaced in the chained PCH.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117238 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index 7636f02bdf..c6df2dd95d 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2410,6 +2410,10 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, else WriteDecl(Context, DOT.getDecl()); } + for (DeclsToRewriteTy::iterator + I = DeclsToRewrite.begin(), E = DeclsToRewrite.end(); I != E; ++I) { + WriteDecl(Context, const_cast<Decl*>(*I)); + } Stream.ExitBlock(); WritePreprocessor(PP); @@ -2720,6 +2724,9 @@ void ASTWriter::WriteDeclUpdatesBlocks() { const Decl *D = I->first; UpdateRecord &URec = I->second; + if (DeclsToRewrite.count(D)) + continue; // The decl will be written completely,no need to store updates. + uint64_t Offset = Stream.GetCurrentBitNo(); Stream.EmitRecord(DECL_UPDATES, URec); |