[cfe-commits] r124651 - in /cfe/trunk: lib/CodeGen/CodeGenModule.cpp test/CodeGenCXX/visibility-hidden-extern-templates.cpp
Rafael Espindola
rafael.espindola at gmail.com
Mon Jan 31 21:45:26 PST 2011
Author: rafael
Date: Mon Jan 31 23:45:26 2011
New Revision: 124651
URL: http://llvm.org/viewvc/llvm-project?rev=124651&view=rev
Log:
Revert 124633. The linker has been told how to merge available_externally.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/test/CodeGenCXX/visibility-hidden-extern-templates.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=124651&r1=124650&r2=124651&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Mon Jan 31 23:45:26 2011
@@ -174,7 +174,8 @@
// 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)
Modified: cfe/trunk/test/CodeGenCXX/visibility-hidden-extern-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/visibility-hidden-extern-templates.cpp?rev=124651&r1=124650&r2=124651&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/visibility-hidden-extern-templates.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/visibility-hidden-extern-templates.cpp Mon Jan 31 23:45:26 2011
@@ -20,7 +20,7 @@
xi.g();
// CHECK: declare void @_ZN1XIcE1fEv
xc.f();
- // CHECK: define available_externally hidden void @_ZN1XIcE1gEv
+ // CHECK: define available_externally void @_ZN1XIcE1gEv
xc.g();
}
More information about the cfe-commits
mailing list