MC CFG: Remap enough for the inserted instruction.
[oota-llvm.git] / lib / MC / MCInst.cpp
index ec97acc554f5786c85263523a67f4ecd58a02bf8..124cc149beb63b856e46efac195e399242223a47 100644 (file)
@@ -25,15 +25,19 @@ 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 << ">";
 }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCOperand::dump() const {
   print(dbgs(), 0);
   dbgs() << "\n";
 }
+#endif
 
 void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   OS << "<MCInst " << getOpcode();
@@ -41,16 +45,6 @@ void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
     OS << " ";
     getOperand(i).print(OS, MAI);
   }
-
-  if (getNumAnnotations()) {
-    OS << " # Annots: ";
-    for (unsigned i = 0, e = getNumAnnotations(); i != e; ++i) {
-      OS << " \"";
-      OS << getAnnotation(i);
-      OS << '"';
-    }
-  }
-
   OS << ">";
 }
 
@@ -67,21 +61,12 @@ void MCInst::dump_pretty(raw_ostream &OS, const MCAsmInfo *MAI,
     OS << Separator;
     getOperand(i).print(OS, MAI);
   }
-
-  if (getNumAnnotations()) {
-    OS << " # Annots: ";
-    for (unsigned i = 0, e = getNumAnnotations(); i != e; ++i) {
-      OS << Separator;
-      OS << '"';
-      OS << getAnnotation(i);
-      OS << '"';
-    }
-  }
-
   OS << ">";
 }
 
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
 void MCInst::dump() const {
   print(dbgs(), 0);
   dbgs() << "\n";
 }
+#endif