Properly handle ExternalSymbol's

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70752 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2009-05-03 13:14:46 +00:00
parent 8725bd22bf
commit 5d59f68ade
5 changed files with 36 additions and 1 deletions

View File

@@ -155,6 +155,15 @@ void MSP430AsmPrinter::printOperand(const MachineInstr *MI, int OpNum,
return;
}
case MachineOperand::MO_ExternalSymbol: {
bool isCallOp = Modifier && !strcmp(Modifier, "call");
std::string Name(TAI->getGlobalPrefix());
Name += MO.getSymbolName();
if (isCallOp)
O << '#';
O << Name;
return;
}
default:
assert(0 && "Not implemented yet!");
}