summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-06 18:03:10 +0000
committerDan Gohman <gohman@apple.com>2009-11-06 18:03:10 +0000
commit0080ee2d910441d7e35ffdba29a61c8a35d8a0d9 (patch)
tree691a6ea7da94d204300555a9a6d9dc545628ed2f /llvm/lib/CodeGen/MachineInstr.cpp
parent45540e91d12c4f19f0ce32eadfb23b1b1f4fb308 (diff)
downloadbcm5719-llvm-0080ee2d910441d7e35ffdba29a61c8a35d8a0d9.tar.gz
bcm5719-llvm-0080ee2d910441d7e35ffdba29a61c8a35d8a0d9.zip
Use WriteAsOperand to print GlobalAddress MachineOperands. This
prints them with the leading '@'. llvm-svn: 86261
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 5744c8a5455..bd1815889b4 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -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;
OpenPOWER on IntegriCloud