summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-07-07 20:04:28 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-07-07 20:04:28 +0000
commit1283e9868d2c1cbf31a834bb5151af6d046c1cb3 (patch)
treed8a0ea5f202e996293ae22a4487e81b466174cad /clang/lib/CodeGen/CodeGenModule.cpp
parent77235d345eb11a3705fbb93196eb7817734402a9 (diff)
downloadbcm5719-llvm-1283e9868d2c1cbf31a834bb5151af6d046c1cb3.tar.gz
bcm5719-llvm-1283e9868d2c1cbf31a834bb5151af6d046c1cb3.zip
[modules ts] Basic for module linkage.
In addition to the formal linkage rules, the Modules TS includes cases where internal-linkage symbols within a module interface unit can be referenced from outside the module via exported inline functions / templates. We give such declarations "module-internal linkage", which is formally internal linkage, but results in an externally-visible symbol. llvm-svn: 307434
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 20d945fe50d..10838b751c8 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -1098,7 +1098,7 @@ static void setLinkageAndVisibilityForGV(llvm::GlobalValue *GV,
const NamedDecl *ND) {
// Set linkage and visibility in case we never see a definition.
LinkageInfo LV = ND->getLinkageAndVisibility();
- if (LV.getLinkage() != ExternalLinkage) {
+ if (!isExternallyVisible(LV.getLinkage())) {
// Don't set internal linkage on declarations.
} else {
if (ND->hasAttr<DLLImportAttr>()) {
OpenPOWER on IntegriCloud