diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-12 21:07:52 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-11-12 21:07:52 +0000 |
commit | 1a43415b28e60e0e421ef60e254126acec7ab462 (patch) | |
tree | f769966940b9b1bae473ce1bcca74691ed22784f /lib/Serialization/ASTWriter.cpp | |
parent | ad834d534e9a5db3d3baa09593775f83ceaff1f2 (diff) |
Add a method in ASTMutationListener for the last use of Decl's [is/set]ChangedSinceDeserialization
and remove them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144466 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/ASTWriter.cpp')
-rw-r--r-- | lib/Serialization/ASTWriter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Serialization/ASTWriter.cpp b/lib/Serialization/ASTWriter.cpp index a98c4cc82b..3618c4b4be 100644 --- a/lib/Serialization/ASTWriter.cpp +++ b/lib/Serialization/ASTWriter.cpp @@ -2960,8 +2960,6 @@ void ASTWriter::WriteASTCore(Sema &SemaRef, MemorizeStatCalls *StatCalls, I != E; ++I) { if (!(*I)->isFromASTFile()) NewGlobalDecls.push_back(std::make_pair((*I)->getKind(), GetDeclRef(*I))); - else if ((*I)->isChangedSinceDeserialization()) - (void)GetDeclRef(*I); // Make sure it's written, but don't record it. } llvm::BitCodeAbbrev *Abv = new llvm::BitCodeAbbrev(); @@ -3454,12 +3452,6 @@ DeclID ASTWriter::GetDeclRef(const Decl *D) { // enqueue it in the list of declarations to emit. ID = NextDeclID++; DeclTypesToEmit.push(const_cast<Decl *>(D)); - } else if (ID < FirstDeclID && D->isChangedSinceDeserialization()) { - // We don't add it to the replacement collection here, because we don't - // have the offset yet. - DeclTypesToEmit.push(const_cast<Decl *>(D)); - // Reset the flag, so that we don't add this decl multiple times. - const_cast<Decl *>(D)->setChangedSinceDeserialization(false); } return ID; @@ -4135,3 +4127,11 @@ void ASTWriter::CompletedObjCForwardRef(const ObjCContainerDecl *D) { RewriteDecl(D); } + +void ASTWriter::UpdatedAttributeList(const Decl *D) { + assert(!WritingAST && "Already writing the AST!"); + if (!D->isFromASTFile()) + return; // Declaration not imported from PCH. + + RewriteDecl(D); +} |