make sure to send external symbols through the mangler,

this fixes mingw-alloca.ll with the new asmprinter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81301 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2009-09-09 00:23:32 +00:00
parent 0c23b6858f
commit 572d972b99

View File

@ -112,11 +112,9 @@ MCSymbol *X86ATTAsmPrinter::GetGlobalAddressSymbol(const MachineOperand &MO) {
}
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 @@ MCSymbol *X86ATTAsmPrinter::GetExternalSymbolSymbol(const MachineOperand &MO) {
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;