From 9fa5a67d3de00247e49c7c85b220789d0a34f523 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 1 Feb 2011 00:37:17 +0000 Subject: Set visibility for available_externally globals. This is important for two reasons: * llvm-link would complains about mismatched visibility * If we produce a relocation with an available_externally, it is good to know that it is hidden. llvm-svn: 124633 --- clang/lib/CodeGen/CodeGenModule.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index b8f91b4..00db261 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -174,8 +174,7 @@ void CodeGenModule::setGlobalVisibility(llvm::GlobalValue *GV, // Set visibility for definitions. NamedDecl::LinkageInfo LV = D->getLinkageAndVisibility(); - if (LV.visibilityExplicit() || !GV->hasAvailableExternallyLinkage()) - GV->setVisibility(GetLLVMVisibility(LV.visibility())); + GV->setVisibility(GetLLVMVisibility(LV.visibility())); } /// Set the symbol visibility of type information (vtable and RTTI) -- cgit v1.1