add a new MCInstPrinter::getOpcodeName interface, when it is

implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2010-02-11 22:39:10 +00:00
parent 780679baa7
commit 7e85180d15
4 changed files with 22 additions and 5 deletions

View File

@@ -14,8 +14,8 @@ namespace llvm {
class MCInst;
class raw_ostream;
class MCAsmInfo;
class StringRef;
/// MCInstPrinter - This is an instance of a target assembly language printer
/// that converts an MCInst to valid target assembly syntax.
class MCInstPrinter {
@@ -40,6 +40,10 @@ public:
/// printInst - Print the specified MCInst to the current raw_ostream.
///
virtual void printInst(const MCInst *MI) = 0;
/// getOpcodeName - Return the name of the specified opcode enum (e.g.
/// "MOV32ri") or empty if we can't resolve it.
virtual StringRef getOpcodeName(unsigned Opcode) const;
};
} // namespace llvm