1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Honour aliases visibility during asm emission

llvm-svn: 48249
This commit is contained in:
Anton Korobeynikov 2008-03-11 21:41:14 +00:00
parent 9b16a36886
commit aa1433ab47

View File

@ -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