summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2013-06-17 21:51:45 +0000
committerEli Friedman <eli.friedman@gmail.com>2013-06-17 21:51:45 +0000
commit40a4becb11c31dd09e850c6ef2a068b4a4622386 (patch)
tree1474e31f99dfd8be8aebb9b2cc1f496816e74a1a /clang/lib/CodeGen
parent180795863dfaf3fb7453bd0fb417d355e2a94016 (diff)
downloadbcm5719-llvm-40a4becb11c31dd09e850c6ef2a068b4a4622386.tar.gz
bcm5719-llvm-40a4becb11c31dd09e850c6ef2a068b4a4622386.zip
Compute the visibility of static local variables consistently. Fixes PR16208.
llvm-svn: 184137
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 614eaab3f37..429d2c8ccac 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -218,8 +218,7 @@ CodeGenFunction::CreateStaticVarDecl(const VarDecl &D,
llvm::GlobalVariable::NotThreadLocal,
AddrSpace);
GV->setAlignment(getContext().getDeclAlign(&D).getQuantity());
- if (Linkage != llvm::GlobalValue::InternalLinkage)
- GV->setVisibility(CurFn->getVisibility());
+ CGM.setGlobalVisibility(GV, &D);
if (D.getTLSKind())
CGM.setTLSMode(GV, D);
OpenPOWER on IntegriCloud