Use WriteAsOperand to print GlobalAddress MachineOperands. This

prints them with the leading '@'.

llvm-svn: 86261
This commit is contained in:
Dan Gohman 2009-11-06 18:03:10 +00:00
parent 45540e91d1
commit 0080ee2d91

View File

@ -265,7 +265,8 @@ void MachineOperand::print(raw_ostream &OS, const TargetMachine *TM) const {
OS << "<jt#" << getIndex() << '>';
break;
case MachineOperand::MO_GlobalAddress:
OS << "<ga:" << ((Value*)getGlobal())->getName();
OS << "<ga:";
WriteAsOperand(OS, getGlobal(), /*PrintType=*/false);
if (getOffset()) OS << "+" << getOffset();
OS << '>';
break;