split MCInst printing out of the X86ATTInstPrinter
class into its own X86ATTInstPrinter class. The inst
printer now has just one dependence on the code generator
(TRI).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81703 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
index 13304c0..9acec26 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
@@ -15,6 +15,7 @@
#define DEBUG_TYPE "asm-printer"
#include "X86ATTAsmPrinter.h"
+#include "X86ATTInstPrinter.h"
#include "X86MCInstLower.h"
#include "X86.h"
#include "X86COFF.h"
@@ -46,6 +47,10 @@
// Primitive Helper Functions.
//===----------------------------------------------------------------------===//
+void X86ATTAsmPrinter::printMCInst(const MCInst *MI) {
+ X86ATTInstPrinter(O, MAI, TRI).printInstruction(MI);
+}
+
void X86ATTAsmPrinter::PrintPICBaseSymbol() const {
// FIXME: Gross const cast hack.
X86ATTAsmPrinter *AP = const_cast<X86ATTAsmPrinter*>(this);