mirror of
https://github.com/RPCS3/llvm.git
synced 2025-03-09 05:11:39 +00:00
Print the visibility of declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124468 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4c4c732960
commit
1ffb533699
@ -753,7 +753,20 @@ bool AsmPrinter::doFinalization(Module &M) {
|
||||
for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
|
||||
I != E; ++I)
|
||||
EmitGlobalVariable(I);
|
||||
|
||||
|
||||
// Emit visibility info for declarations
|
||||
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) {
|
||||
const Function &F = *I;
|
||||
if (!F.isDeclaration())
|
||||
continue;
|
||||
GlobalValue::VisibilityTypes V = F.getVisibility();
|
||||
if (V == GlobalValue::DefaultVisibility)
|
||||
continue;
|
||||
|
||||
MCSymbol *Name = Mang->getSymbol(&F);
|
||||
EmitVisibility(Name, V);
|
||||
}
|
||||
|
||||
// Finalize debug and EH information.
|
||||
if (DE) {
|
||||
{
|
||||
|
11
test/CodeGen/X86/visibility.ll
Normal file
11
test/CodeGen/X86/visibility.ll
Normal file
@ -0,0 +1,11 @@
|
||||
; RUN: llc %s -o - | FileCheck %s
|
||||
|
||||
define hidden void @foo() nounwind {
|
||||
entry:
|
||||
call void @bar()
|
||||
ret void
|
||||
}
|
||||
|
||||
declare hidden void @bar()
|
||||
|
||||
;CHECK: .hidden bar
|
Loading…
x
Reference in New Issue
Block a user