diff options
| author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-09-30 23:44:19 +0000 |
|---|---|---|
| committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2001-09-30 23:44:19 +0000 |
| commit | e44abbb99db99321ba73403e5da5787ba3111a6a (patch) | |
| tree | 1aa428d856ca5fa05696326d967266f7f901f1ab /llvm/lib | |
| parent | 819635eb7c8525e44b601cbf259e9cc069f857fb (diff) | |
| download | bcm5719-llvm-e44abbb99db99321ba73403e5da5787ba3111a6a.tar.gz bcm5719-llvm-e44abbb99db99321ba73403e5da5787ba3111a6a.zip | |
Improved dump for disp type operand.
llvm-svn: 679
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index 1db2d48fc9e..1e3300763de 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/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; |

