diff options
author | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:21:04 +0000 |
---|---|---|
committer | Anton Korobeynikov <asl@math.spbu.ru> | 2008-09-24 22:21:04 +0000 |
commit | 541af7f769c89de8a7f52d563cf317ad7a86c245 (patch) | |
tree | 839cccfb40be59ee03b7635bf9bec1a305bcfe84 /lib/CodeGen/AsmPrinter | |
parent | 4cad98a0bb3c0c10a53b7f3c373be7af32788f51 (diff) | |
download | external_llvm-541af7f769c89de8a7f52d563cf317ad7a86c245.zip external_llvm-541af7f769c89de8a7f52d563cf317ad7a86c245.tar.gz external_llvm-541af7f769c89de8a7f52d563cf317ad7a86c245.tar.bz2 |
Use helper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter')
-rw-r--r-- | lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 9ee3b5f..ef1fca0 100644 --- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -185,7 +185,7 @@ bool AsmPrinter::doFinalization(Module &M) { const GlobalValue *GV = cast<GlobalValue>(I->getAliasedGlobal()); Target = Mang->getValueName(GV); - + if (I->hasExternalLinkage() || !TAI->getWeakRefDirective()) O << "\t.globl\t" << Name << '\n'; else if (I->hasWeakLinkage()) @@ -193,13 +193,7 @@ bool AsmPrinter::doFinalization(Module &M) { 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'; - } + printVisibility(Name, I->getVisibility()); O << TAI->getSetDirective() << ' ' << Name << ", " << Target << '\n'; |