enhance llvm-mc -show-inst to print the enum of an instruction, like so:
[oota-llvm.git] / lib / Target / X86 / AsmPrinter / X86IntelInstPrinter.cpp
index 4274d0a436c1c803d4b2a78786b4ad51bf2ae922..610beb550b24424638a66d69094b946bc767adf2 100644 (file)
@@ -24,10 +24,14 @@ using namespace llvm;
 
 // Include the auto-generated portion of the assembly writer.
 #define MachineInstr MCInst
+#define GET_INSTRUCTION_NAME
 #include "X86GenAsmWriter1.inc"
 #undef MachineInstr
 
 void X86IntelInstPrinter::printInst(const MCInst *MI) { printInstruction(MI); }
+StringRef X86IntelInstPrinter::getOpcodeName(unsigned Opcode) const {
+  return getInstructionName(Opcode);
+}
 
 void X86IntelInstPrinter::printSSECC(const MCInst *MI, unsigned Op) {
   switch (MI->getOperand(Op).getImm()) {