[llvm] r242027 - Print the visibility of available_externally functions.
Rafael Espindola
rafael.espindola at gmail.com
Mon Jul 13 06:55:18 PDT 2015
Author: rafael
Date: Mon Jul 13 08:55:18 2015
New Revision: 242027
URL: http://llvm.org/viewvc/llvm-project?rev=242027&view=rev
Log:
Print the visibility of available_externally functions.
We were already printing it for declarations, but not available_externally.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/test/CodeGen/X86/visibility.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=242027&r1=242026&r2=242027&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Mon Jul 13 08:55:18 2015
@@ -1023,7 +1023,7 @@ bool AsmPrinter::doFinalization(Module &
// Emit visibility info for declarations
for (const Function &F : M) {
- if (!F.isDeclaration())
+ if (!F.isDeclarationForLinker())
continue;
GlobalValue::VisibilityTypes V = F.getVisibility();
if (V == GlobalValue::DefaultVisibility)
Modified: llvm/trunk/test/CodeGen/X86/visibility.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/visibility.ll?rev=242027&r1=242026&r2=242027&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/visibility.ll (original)
+++ llvm/trunk/test/CodeGen/X86/visibility.ll Mon Jul 13 08:55:18 2015
@@ -2,13 +2,19 @@
@zed = external hidden constant i32
+define available_externally hidden void @baz() {
+ ret void
+}
+
define hidden void @foo() nounwind {
entry:
call void @bar(i32* @zed)
+ call void @baz()
ret void
}
declare hidden void @bar(i32*)
;CHECK: .hidden zed
+;CHECK: .hidden baz
;CHECK: .hidden bar
More information about the llvm-commits
mailing list