summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2011-02-01 05:45:26 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2011-02-01 05:45:26 +0000
commit88ea6ab44f5ab3d3cc08d587b49389e516002113 (patch)
treed8bf6d83bd46ec1af6113f3d70729bd061ec394a /clang/lib/CodeGen/CodeGenModule.cpp
parent4a9b18d07b750cb28066f9fc4534ba1968768a6e (diff)
downloadbcm5719-llvm-88ea6ab44f5ab3d3cc08d587b49389e516002113.tar.gz
bcm5719-llvm-88ea6ab44f5ab3d3cc08d587b49389e516002113.zip
Revert 124633. The linker has been told how to merge available_externally.
llvm-svn: 124651
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 00db2616498..b8f91b464dd 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -174,7 +174,8 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV,
// Set visibility for definitions.
NamedDecl::LinkageInfo LV = D->getLinkageAndVisibility();
- GV->setVisibility(GetLLVMVisibility(LV.visibility()));
+ if (LV.visibilityExplicit() || !GV->hasAvailableExternallyLinkage())
+ GV->setVisibility(GetLLVMVisibility(LV.visibility()));
}
/// Set the symbol visibility of type information (vtable and RTTI)
OpenPOWER on IntegriCloud