diff options
author | Craig Topper <craig.topper@gmail.com> | 2012-04-02 06:09:36 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2012-04-02 06:09:36 +0000 |
commit | 17463b3ef1a3d39b10619254f12e806c8c43f9e7 (patch) | |
tree | 35c3631e8b4a3f1abea9c951e930c084128aa915 /include/llvm | |
parent | 1fcbca05db736afc3e555aadc14ae3a5bef59198 (diff) | |
download | llvm-17463b3ef1a3d39b10619254f12e806c8c43f9e7.tar.gz llvm-17463b3ef1a3d39b10619254f12e806c8c43f9e7.tar.bz2 llvm-17463b3ef1a3d39b10619254f12e806c8c43f9e7.tar.xz |
Make MCInstrInfo available to the MCInstPrinter. This will be used to remove getInstructionName and the static data it contains since the same tables are already in MCInstrInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153860 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/MC/MCInstPrinter.h | 7 | ||||
-rw-r--r-- | include/llvm/Support/TargetRegistry.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/llvm/MC/MCInstPrinter.h b/include/llvm/MC/MCInstPrinter.h index 4d2adfa475..1823e7b2d3 100644 --- a/include/llvm/MC/MCInstPrinter.h +++ b/include/llvm/MC/MCInstPrinter.h @@ -14,6 +14,7 @@ namespace llvm { class MCInst; class raw_ostream; class MCAsmInfo; +class MCInstrInfo; class MCRegisterInfo; class StringRef; @@ -26,6 +27,7 @@ protected: /// assembly emission is disable. raw_ostream *CommentStream; const MCAsmInfo &MAI; + const MCInstrInfo &MII; const MCRegisterInfo &MRI; /// The current set of available features. @@ -34,8 +36,9 @@ protected: /// Utility function for printing annotations. void printAnnotation(raw_ostream &OS, StringRef Annot); public: - MCInstPrinter(const MCAsmInfo &mai, const MCRegisterInfo &mri) - : CommentStream(0), MAI(mai), MRI(mri), AvailableFeatures(0) {} + MCInstPrinter(const MCAsmInfo &mai, const MCInstrInfo &mii, + const MCRegisterInfo &mri) + : CommentStream(0), MAI(mai), MII(mii), MRI(mri), AvailableFeatures(0) {} virtual ~MCInstPrinter(); diff --git a/include/llvm/Support/TargetRegistry.h b/include/llvm/Support/TargetRegistry.h index 93bdbcafee..88081307ac 100644 --- a/include/llvm/Support/TargetRegistry.h +++ b/include/llvm/Support/TargetRegistry.h @@ -104,6 +104,7 @@ namespace llvm { typedef MCInstPrinter *(*MCInstPrinterCtorTy)(const Target &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, + const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI); typedef MCCodeEmitter *(*MCCodeEmitterCtorTy)(const MCInstrInfo &II, @@ -393,11 +394,12 @@ namespace llvm { MCInstPrinter *createMCInstPrinter(unsigned SyntaxVariant, const MCAsmInfo &MAI, + const MCInstrInfo &MII, const MCRegisterInfo &MRI, const MCSubtargetInfo &STI) const { if (!MCInstPrinterCtorFn) return 0; - return MCInstPrinterCtorFn(*this, SyntaxVariant, MAI, MRI, STI); + return MCInstPrinterCtorFn(*this, SyntaxVariant, MAI, MII, MRI, STI); } |