summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-16 18:17:26 +0000
committerChris Lattner <sabre@nondot.org>2010-01-16 18:17:26 +0000
commit8a1f23af110e58c78c5f2d5d5e015ed1cd848129 (patch)
tree09b3acdda532f537f492ae867fa339450468f342 /llvm/lib
parent27aa77ac086e5474948f916296828e0fe33c1523 (diff)
downloadbcm5719-llvm-8a1f23af110e58c78c5f2d5d5e015ed1cd848129.tar.gz
bcm5719-llvm-8a1f23af110e58c78c5f2d5d5e015ed1cd848129.zip
eliminate uses of getMangledName from AsmPrinter.cpp, last up is
dwarf emission which is going to be more invasive. llvm-svn: 93645
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index ed6ccec0c57..c83a0dae962 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -163,13 +163,17 @@ bool AsmPrinter::doFinalization(Module &M) {
// Print out module-level global variables here.
for (Module::const_global_iterator I = M.global_begin(), E = M.global_end();
I != E; ++I) {
- if (I->hasExternalWeakLinkage())
- O << MAI->getWeakRefDirective() << Mang->getMangledName(I) << '\n';
+ if (!I->hasExternalWeakLinkage()) continue;
+ O << MAI->getWeakRefDirective();
+ GetGlobalValueSymbol(I)->print(O, MAI);
+ O << '\n';
}
for (Module::const_iterator I = M.begin(), E = M.end(); I != E; ++I) {
- if (I->hasExternalWeakLinkage())
- O << MAI->getWeakRefDirective() << Mang->getMangledName(I) << '\n';
+ if (!I->hasExternalWeakLinkage()) continue;
+ O << MAI->getWeakRefDirective();
+ GetGlobalValueSymbol(I)->print(O, MAI);
+ O << '\n';
}
}
@@ -828,7 +832,7 @@ void AsmPrinter::EmitConstantValueOnly(const Constant *CV) {
if (const GlobalValue *GV = dyn_cast<GlobalValue>(CV)) {
// This is a constant address for a global variable or function. Use the
// name of the variable or function as the address value.
- O << Mang->getMangledName(GV);
+ GetGlobalValueSymbol(GV)->print(O, MAI);
return;
}
OpenPOWER on IntegriCloud