summaryrefslogtreecommitdiff
path: root/lib/MC/MCInst.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-01-19 19:32:20 +0000
committerOwen Anderson <resistor@mac.com>2012-01-19 19:32:20 +0000
commit27ff6b5e2bc038b1013b5c93e5c2da0144341740 (patch)
tree6f200b8d54cbe0f2701a0d1caf629ca8defaef81 /lib/MC/MCInst.cpp
parent7b672fe03b6f1734ac545e3aceb6d90bed3f0406 (diff)
downloadllvm-27ff6b5e2bc038b1013b5c93e5c2da0144341740.tar.gz
llvm-27ff6b5e2bc038b1013b5c93e5c2da0144341740.tar.bz2
llvm-27ff6b5e2bc038b1013b5c93e5c2da0144341740.tar.xz
Add a dump() implementation for sub-instruction MCOperands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCInst.cpp')
-rw-r--r--lib/MC/MCInst.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/MC/MCInst.cpp b/lib/MC/MCInst.cpp
index 4cb628b395..7bbfd2efa1 100644
--- a/lib/MC/MCInst.cpp
+++ b/lib/MC/MCInst.cpp
@@ -25,6 +25,8 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
OS << "Imm:" << getImm();
else if (isExpr()) {
OS << "Expr:(" << *getExpr() << ")";
+ } else if (isInst()) {
+ OS << "Inst:(" << *getInst() << ")";
} else
OS << "UNDEFINED";
OS << ">";