summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Decl.cpp
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2017-10-10 13:00:18 +0000
committerEric Liu <ioeric@google.com>2017-10-10 13:00:18 +0000
commit8cd38554fbd1ff4a3dbece202d10e415aa892eac (patch)
treebc3adaaa8bb29cee4e093ca2c2e864497cb18297 /clang/lib/AST/Decl.cpp
parent51c1b2280665589c82329b9d6dfb20600ba42efa (diff)
downloadbcm5719-llvm-8cd38554fbd1ff4a3dbece202d10e415aa892eac.tar.gz
bcm5719-llvm-8cd38554fbd1ff4a3dbece202d10e415aa892eac.zip
Revert "[Modules TS] Avoid computing the linkage of the enclosing DeclContext for a declaration in the global module."
This reverts commit r315256. See the original commit thread for reason. llvm-svn: 315308
Diffstat (limited to 'clang/lib/AST/Decl.cpp')
-rw-r--r--clang/lib/AST/Decl.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index 4a9b9bea830..cdd89d20e6b 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -1395,7 +1395,7 @@ LinkageInfo LinkageComputer::getDeclLinkageAndVisibility(const NamedDecl *D) {
: NamedDecl::VisibilityForValue));
}
-Module *Decl::getOwningModuleForLinkage(bool IgnoreLinkage) const {
+Module *Decl::getOwningModuleForLinkage() const {
Module *M = getOwningModule();
if (!M)
return nullptr;
@@ -1413,8 +1413,6 @@ Module *Decl::getOwningModuleForLinkage(bool IgnoreLinkage) const {
// for linkage purposes. But internal linkage declarations in the global
// module fragment of a particular module are owned by that module for
// linkage purposes.
- if (IgnoreLinkage)
- return nullptr;
bool InternalLinkage;
if (auto *ND = dyn_cast<NamedDecl>(this))
InternalLinkage = !ND->hasExternalFormalLinkage();
OpenPOWER on IntegriCloud