summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-14 05:27:13 +0000
committerChris Lattner <sabre@nondot.org>2009-04-14 05:27:13 +0000
commit6a0f907a5ec0d2af3378c7f79667240858d4906d (patch)
treec261f4fd49dcd21474173467acbc960b36ee9719 /clang/lib/CodeGen/CodeGenModule.cpp
parent825676afdfb0505e93c6baecd5fa33d7ed32ef1a (diff)
downloadbcm5719-llvm-6a0f907a5ec0d2af3378c7f79667240858d4906d.tar.gz
bcm5719-llvm-6a0f907a5ec0d2af3378c7f79667240858d4906d.zip
do not set visibility on "private" or "available externally" linkage objects.
llvm-svn: 69025
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index f981453bf08..2bcd65e7b6d 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -100,7 +100,7 @@ void CodeGenModule::ErrorUnsupported(const Decl *D, const char *Type,
static void setGlobalVisibility(llvm::GlobalValue *GV,
VisibilityAttr::VisibilityTypes Vis) {
// Internal definitions should always have default visibility.
- if (GV->hasInternalLinkage()) {
+ if (GV->hasLocalLinkage()) {
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
return;
}
@@ -122,7 +122,7 @@ static void setGlobalVisibility(llvm::GlobalValue *GV,
static void setGlobalOptionVisibility(llvm::GlobalValue *GV,
LangOptions::VisibilityMode Vis) {
// Internal definitions should always have default visibility.
- if (GV->hasInternalLinkage()) {
+ if (GV->hasLocalLinkage()) {
GV->setVisibility(llvm::GlobalValue::DefaultVisibility);
return;
}
OpenPOWER on IntegriCloud