diff options
author | Dan Gohman <gohman@apple.com> | 2009-11-06 18:03:10 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-11-06 18:03:10 +0000 |
commit | 8d4e3b5b48b245ed65259270a53fcaf0bf91d9f7 (patch) | |
tree | 750ef4ed905e9e7b8fa6b1a7c5fa25ed3626f81e /lib/CodeGen/MachineInstr.cpp | |
parent | 84c73e9b8234287c4521e6d7e27c15e77843489e (diff) |
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/CodeGen/MachineInstr.cpp')
-rw-r--r-- | lib/CodeGen/MachineInstr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 5744c8a545..bd1815889b 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; |