[MC] Adding prettyPrintAsm to MCTargetStreamer to allow targets to specialize how...
[oota-llvm.git] / lib / MC / MCAsmStreamer.cpp
index 0f405ad1193ec3081517feaab6148faf6c0c9baf..9a65a315897208d7b1c4372e7ce702562cbb875b 100644 (file)
@@ -1308,7 +1308,10 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst, const MCSubtargetInfo &S
     GetCommentOS() << "\n";
   }
 
-  InstPrinter->printInst(&Inst, OS, "", STI);
+  if(getTargetStreamer())
+    getTargetStreamer()->prettyPrintAsm(*InstPrinter, OS, Inst, STI);
+  else
+    InstPrinter->printInst(&Inst, OS, "", STI);
 
   EmitEOL();
 }