[llvm-commits] [llvm] r86261 - /llvm/trunk/lib/CodeGen/MachineInstr.cpp
Dan Gohman
gohman at apple.com
Fri Nov 6 10:03:10 PST 2009
Author: djg
Date: Fri Nov 6 12:03:10 2009
New Revision: 86261
URL: http://llvm.org/viewvc/llvm-project?rev=86261&view=rev
Log:
Use WriteAsOperand to print GlobalAddress MachineOperands. This
prints them with the leading '@'.
Modified:
llvm/trunk/lib/CodeGen/MachineInstr.cpp
Modified: llvm/trunk/lib/CodeGen/MachineInstr.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineInstr.cpp?rev=86261&r1=86260&r2=86261&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineInstr.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineInstr.cpp Fri Nov 6 12:03:10 2009
@@ -265,7 +265,8 @@
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;
More information about the llvm-commits
mailing list