diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-11 21:41:14 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-03-11 21:41:14 +0000 |
commit | 22c9e65643e0c6b43be37a19e59491ef0081092c (patch) | |
tree | 4e26b3da88a2cb8166f87ba107b2d910bf662420 /lib/CodeGen/AsmPrinter.cpp | |
parent | f8342b98663096186c3a367f7d0fd5ebb7064a52 (diff) |
Honour aliases visibility during asm emission
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48249 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter.cpp index 80965020d0..3439460880 100644 --- a/lib/CodeGen/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter.cpp @@ -161,7 +161,15 @@ bool AsmPrinter::doFinalization(Module &M) { O << TAI->getWeakRefDirective() << Name << "\n"; else if (!I->hasInternalLinkage()) assert(0 && "Invalid alias linkage"); - + + if (I->hasHiddenVisibility()) { + if (const char *Directive = TAI->getHiddenDirective()) + O << Directive << Name << "\n"; + } else if (I->hasProtectedVisibility()) { + if (const char *Directive = TAI->getProtectedDirective()) + O << Directive << Name << "\n"; + } + O << TAI->getSetDirective() << ' ' << Name << ", " << Target << "\n"; // If the aliasee has external weak linkage it can be referenced only by |