Improved dump for disp type operand.

llvm-svn: 679
This commit is contained in:
Vikram S. Adve 2001-09-30 23:44:19 +00:00
parent 819635eb7c
commit e44abbb99d
1 changed files with 7 additions and 1 deletions

View File

@ -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;