summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriter.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-12 21:07:52 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-11-12 21:07:52 +0000
commit0ca3a8b6efa8af8dd00bd28275ba01719c676d74 (patch)
tree4417a30f11c76607d3cf187bde858826d01ac266 /clang/lib/Serialization/ASTWriter.cpp
parentb97a4025fffa945bdf6cfb1d12f20930295156b3 (diff)
downloadbcm5719-llvm-0ca3a8b6efa8af8dd00bd28275ba01719c676d74.tar.gz
bcm5719-llvm-0ca3a8b6efa8af8dd00bd28275ba01719c676d74.zip
Add a method in ASTMutationListener for the last use of Decl's [is/set]ChangedSinceDeserialization
and remove them. llvm-svn: 144466
Diffstat (limited to 'clang/lib/Serialization/ASTWriter.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/lib/Serialization/ASTWriter.cpp b/clang/lib/Serialization/ASTWriter.cpp
index a98c4cc82bb..3618c4b4be5 100644
--- a/clang/lib/Serialization/ASTWriter.cpp
+++ b/clang/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);
+}
OpenPOWER on IntegriCloud