summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTWriterDecl.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-03-26 04:27:10 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-03-26 04:27:10 +0000
commit8a3d24dcf82fa19e822a95f51679af2a7a65d580 (patch)
treecceaede49e2b59136797277372e2c832e9b8f74e /clang/lib/Serialization/ASTWriterDecl.cpp
parent65ebb4ac8a7119a16e5a00b075e5b382fd4e434c (diff)
downloadbcm5719-llvm-8a3d24dcf82fa19e822a95f51679af2a7a65d580.tar.gz
bcm5719-llvm-8a3d24dcf82fa19e822a95f51679af2a7a65d580.zip
[Modules] Delete a bunch of complex code for ensuring visible decls in
updated decl contexts get emitted. Since this code was added, we have newer vastly simpler code for handling this. The code I'm removing was very expensive and also generated unstable order of declarations which made module outputs non-deterministic. All of the tests continue to pass for me and I'm able to check the difference between the .pcm files after merging modules together. llvm-svn: 233251
Diffstat (limited to 'clang/lib/Serialization/ASTWriterDecl.cpp')
-rw-r--r--clang/lib/Serialization/ASTWriterDecl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Serialization/ASTWriterDecl.cpp b/clang/lib/Serialization/ASTWriterDecl.cpp
index 1324f2c8c7f..f4268460350 100644
--- a/clang/lib/Serialization/ASTWriterDecl.cpp
+++ b/clang/lib/Serialization/ASTWriterDecl.cpp
@@ -243,7 +243,7 @@ void ASTDeclWriter::VisitDecl(Decl *D) {
while (auto *NS = dyn_cast<NamespaceDecl>(DC->getRedeclContext())) {
if (!NS->isFromASTFile())
break;
- Writer.AddUpdatedDeclContext(NS->getPrimaryContext());
+ Writer.UpdatedDeclContexts.insert(NS->getPrimaryContext());
if (!NS->isInlineNamespace())
break;
DC = NS->getParent();
@@ -978,7 +978,7 @@ void ASTDeclWriter::VisitNamespaceDecl(NamespaceDecl *D) {
if (Writer.hasChain() && !D->isOriginalNamespace() &&
D->getOriginalNamespace()->isFromASTFile()) {
NamespaceDecl *NS = D->getOriginalNamespace();
- Writer.AddUpdatedDeclContext(NS);
+ Writer.UpdatedDeclContexts.insert(NS);
// Make sure all visible decls are written. They will be recorded later.
if (StoredDeclsMap *Map = NS->buildLookup()) {
OpenPOWER on IntegriCloud