llvm.org GIT mirror llvm / 1ffb533
Print the visibility of declarations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124468 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 9 years ago
2 changed file(s) with 25 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
752752 for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
753753 I != E; ++I)
754754 EmitGlobalVariable(I);
755
755
756 // Emit visibility info for declarations
757 for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) {
758 const Function &F = *I;
759 if (!F.isDeclaration())
760 continue;
761 GlobalValue::VisibilityTypes V = F.getVisibility();
762 if (V == GlobalValue::DefaultVisibility)
763 continue;
764
765 MCSymbol *Name = Mang->getSymbol(&F);
766 EmitVisibility(Name, V);
767 }
768
756769 // Finalize debug and EH information.
757770 if (DE) {
758771 {
0 ; RUN: llc %s -o - | FileCheck %s
1
2 define hidden void @foo() nounwind {
3 entry:
4 call void @bar()
5 ret void
6 }
7
8 declare hidden void @bar()
9
10 ;CHECK: .hidden bar