Add the new builder arthmetic instructions to llvm-c and ocaml.
[oota-llvm.git] / lib / MC / MCInst.cpp
index d05031870add8487c8101a2f407505146d857648..0634c9faf6fad26e2db09ae964a4858e00d0bec6 100644 (file)
@@ -9,6 +9,7 @@
 
 #include "llvm/MC/MCInst.h"
 #include "llvm/MC/MCExpr.h"
+#include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
 
 using namespace llvm;
@@ -22,17 +23,15 @@ void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   else if (isImm())
     OS << "Imm:" << getImm();
   else if (isExpr()) {
-    OS << "Expr:(";
-    getExpr()->print(OS, MAI);
-    OS << ")";
+    OS << "Expr:(" << *getExpr() << ")";
   } else
     OS << "UNDEFINED";
   OS << ">";
 }
 
 void MCOperand::dump() const {
-  print(errs(), 0);
-  errs() << "\n";
+  print(dbgs(), 0);
+  dbgs() << "\n";
 }
 
 void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
@@ -45,6 +44,6 @@ void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
 }
 
 void MCInst::dump() const {
-  print(errs(), 0);
-  errs() << "\n";
+  print(dbgs(), 0);
+  dbgs() << "\n";
 }