reapply my strstr optimization. I have reproduced the x86-64 bootstrap
[oota-llvm.git] / lib / MC / MCInst.cpp
index ec061463b754b1b189f95e5358e0bbbae19be54d..d05031870add8487c8101a2f407505146d857648 100644 (file)
@@ -13,7 +13,7 @@
 
 using namespace llvm;
 
-void MCOperand::print(raw_ostream &OS) const {
+void MCOperand::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   OS << "<MCOperand ";
   if (!isValid())
     OS << "INVALID";
@@ -21,12 +21,9 @@ void MCOperand::print(raw_ostream &OS) const {
     OS << "Reg:" << getReg();
   else if (isImm())
     OS << "Imm:" << getImm();
-  else if (isMBBLabel())
-    OS << "MBB:(" << getMBBLabelFunction() << ","
-       << getMBBLabelBlock() << ")";
   else if (isExpr()) {
     OS << "Expr:(";
-    getExpr()->print(OS);
+    getExpr()->print(OS, MAI);
     OS << ")";
   } else
     OS << "UNDEFINED";
@@ -34,20 +31,20 @@ void MCOperand::print(raw_ostream &OS) const {
 }
 
 void MCOperand::dump() const {
-  print(errs());
+  print(errs(), 0);
   errs() << "\n";
 }
 
-void MCInst::print(raw_ostream &OS) const {
+void MCInst::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
   OS << "<MCInst " << getOpcode();
   for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
     OS << " ";
-    getOperand(i).print(OS);
+    getOperand(i).print(OS, MAI);
   }
   OS << ">";
 }
 
 void MCInst::dump() const {
-  print(errs());
+  print(errs(), 0);
   errs() << "\n";
 }