aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
commit400718724c2abc7eab43ccf09a4e970a23846017 (patch)
tree750ef4ed905e9e7b8fa6b1a7c5fa25ed3626f81e /lib
parent83e42c7163cc29cf8afd36082164ffb8a2e4b454 (diff)
downloadexternal_llvm-400718724c2abc7eab43ccf09a4e970a23846017.zip
external_llvm-400718724c2abc7eab43ccf09a4e970a23846017.tar.gz
external_llvm-400718724c2abc7eab43ccf09a4e970a23846017.tar.bz2
Use WriteAsOperand to print GlobalAddress MachineOperands. This
prints them with the leading '@'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/MachineInstr.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 5744c8a5..bd18158 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/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;