summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGDecl.cpp
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
commit93cc515d3b99dca18d287d200e19355a2e9c02b2 (patch)
tree597f1bc54d6ee9c1ca13a21fd563538827362cd6 /lib/CodeGen/CGDecl.cpp
parent26e51781f9d55cdae764facf8fe773aa2adb4569 (diff)
downloadclang-93cc515d3b99dca18d287d200e19355a2e9c02b2.tar.gz
clang-93cc515d3b99dca18d287d200e19355a2e9c02b2.tar.bz2
clang-93cc515d3b99dca18d287d200e19355a2e9c02b2.tar.xz
Compute the visibility of static local variables consistently. Fixes PR16208.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDecl.cpp')
-rw-r--r--lib/CodeGen/CGDecl.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDecl.cpp b/lib/CodeGen/CGDecl.cpp
index 614eaab3f3..429d2c8cca 100644
--- a/lib/CodeGen/CGDecl.cpp
+++ b/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);