[llvm-commits] [llvm] r93645 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Chris Lattner
sabre at nondot.org
Sat Jan 16 10:17:26 PST 2010
Author: lattner
Date: Sat Jan 16 12:17:26 2010
New Revision: 93645
URL: http://llvm.org/viewvc/llvm-project?rev=93645&view=rev
Log:
eliminate uses of getMangledName from AsmPrinter.cpp, last up is
dwarf emission which is going to be more invasive.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=93645&r1=93644&r2=93645&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat Jan 16 12:17:26 2010
@@ -163,13 +163,17 @@
// 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 @@
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;
}
More information about the llvm-commits
mailing list