summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2018-09-12 02:13:48 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2018-09-12 02:13:48 +0000
commite731d9acff40e6240b8677583b3ff2aaa23e5211 (patch)
treec0062e81f0611f7c4c057bb886435f70e3786759 /clang/lib/AST
parentc457766c6d739ba717f881b36a76ff60d3b75809 (diff)
downloadbcm5719-llvm-e731d9acff40e6240b8677583b3ff2aaa23e5211.tar.gz
bcm5719-llvm-e731d9acff40e6240b8677583b3ff2aaa23e5211.zip
Track definition merging on the canonical declaration even when local
submodule visibility is disabled. Attempting to pick a specific declaration to make visible when the module containing the merged declaration becomes visible is error-prone, as we don't yet know which declaration we'll choose to be the definition when we are informed of the merging. llvm-svn: 342019
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/ASTContext.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 0ed52ffd351..b107e8bd2a3 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -932,10 +932,7 @@ void ASTContext::mergeDefinitionIntoModule(NamedDecl *ND, Module *M,
if (auto *Listener = getASTMutationListener())
Listener->RedefinedHiddenDefinition(ND, M);
- if (getLangOpts().ModulesLocalVisibility)
- MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
- else
- ND->setVisibleDespiteOwningModule();
+ MergedDefModules[cast<NamedDecl>(ND->getCanonicalDecl())].push_back(M);
}
void ASTContext::deduplicateMergedDefinitonsFor(NamedDecl *ND) {
OpenPOWER on IntegriCloud