[llvm-commits] [llvm] r81301 - /llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
Chris Lattner
sabre at nondot.org
Tue Sep 8 17:23:32 PDT 2009
Author: lattner
Date: Tue Sep 8 19:23:32 2009
New Revision: 81301
URL: http://llvm.org/viewvc/llvm-project?rev=81301&view=rev
Log:
make sure to send external symbols through the mangler,
this fixes mingw-alloca.ll with the new asmprinter.
Modified:
llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
Modified: llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp?rev=81301&r1=81300&r2=81301&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp (original)
+++ llvm/trunk/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp Tue Sep 8 19:23:32 2009
@@ -112,11 +112,9 @@
}
MCSymbol *X86ATTAsmPrinter::GetExternalSymbolSymbol(const MachineOperand &MO) {
- std::string Name = MO.getSymbolName();
- if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB) {
+ std::string Name = Mang->makeNameProper(MO.getSymbolName());
+ if (MO.getTargetFlags() == X86II::MO_DARWIN_STUB)
Name += "$stub";
- }
-
switch (MO.getTargetFlags()) {
default: llvm_unreachable("Unknown target flag on GV operand");
@@ -129,7 +127,7 @@
Name = "__imp_" + Name;
break;
case X86II::MO_DARWIN_STUB:
- FnStubs[Name] = MO.getSymbolName();
+ FnStubs[Name] = Mang->makeNameProper(MO.getSymbolName());
break;
// FIXME: These probably should be a modifier on the symbol or something??
case X86II::MO_TLSGD: Name += "@TLSGD"; break;
More information about the llvm-commits
mailing list