summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2008-03-11 21:41:14 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2008-03-11 21:41:14 +0000
commit2601d7ee50d055d072052971f2ca5244f1e2c6a5 (patch)
treee5e7c8939494e9aec3fb02e375ae65259c436b6c /llvm/lib/CodeGen
parentdb691cbd6dc2459d462d7d64322fedc02f564255 (diff)
downloadbcm5719-llvm-2601d7ee50d055d072052971f2ca5244f1e2c6a5.tar.gz
bcm5719-llvm-2601d7ee50d055d072052971f2ca5244f1e2c6a5.zip
Honour aliases visibility during asm emission
llvm-svn: 48249
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter.cpp
index 80965020d0d..34394608807 100644
--- a/llvm/lib/CodeGen/AsmPrinter.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud