switch the x86 asmprinters to use getRegisterName instead
of getting it from TRI, inst printing now is codegen context
free!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81710 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
index d989f60..a25fb2e 100644
--- a/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp
@@ -19,7 +19,6 @@
#include "llvm/MC/MCExpr.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/FormattedStream.h"
-#include "llvm/Target/TargetRegisterInfo.h" // FIXME: REMOVE.
using namespace llvm;
// Include the auto-generated portion of the assembly writer.
@@ -70,7 +69,7 @@
const MCOperand &Op = MI->getOperand(OpNo);
if (Op.isReg()) {
- O << '%' << TRI->getAsmName(Op.getReg());
+ O << '%' << getRegisterName(Op.getReg());
return;
} else if (Op.isImm()) {
O << '$' << Op.getImm();