summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit4b53e188c194198e75befec28da377efaeb2421e (patch)
tree5d2dfbc376628f6a6fffb8aeeefd5f24befc6cbc /llvm/lib/MC/MCInst.cpp
parentc67903cc19b3de3fcb3d3c49a31941084e28a60f (diff)
downloadbcm5719-llvm-4b53e188c194198e75befec28da377efaeb2421e.tar.gz
bcm5719-llvm-4b53e188c194198e75befec28da377efaeb2421e.zip
Add a dump() implementation for sub-instruction MCOperands.
llvm-svn: 148493
Diffstat (limited to 'llvm/lib/MC/MCInst.cpp')
-rw-r--r--llvm/lib/MC/MCInst.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/MC/MCInst.cpp b/llvm/lib/MC/MCInst.cpp
index 4cb628b395c..7bbfd2efa13 100644
--- a/llvm/lib/MC/MCInst.cpp
+++ b/llvm/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 << ">";
OpenPOWER on IntegriCloud