From: Vikram S. Adve Date: Sun, 30 Sep 2001 23:44:19 +0000 (+0000) Subject: Improved dump for disp type operand. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e949da5bb18f89de40b6781237dfe616cba7bfc9;p=oota-llvm.git Improved dump for disp type operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@679 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index 1db2d48fc9e..1e3300763de 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -139,7 +139,13 @@ operator<<(ostream &os, const MachineOperand &mop) case MachineOperand::MO_UnextendedImmed: return os << mop.immedVal; case MachineOperand::MO_PCRelativeDisp: - return os << "%disp(label " << mop.getVRegValue() << ")"; + { + const Value* opVal = mop.getVRegValue(); + bool isLabel = opVal->isMethod() || opVal->isBasicBlock(); + return os << "%disp(" + << (isLabel? "label " : "addr-of-val ") + << opVal << ")"; + } default: assert(0 && "Unrecognized operand type"); break;