diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-21 04:13:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-21 04:13:46 +0000 |
commit | a5c177e70a42f48e4885075c4c48aad0816a2817 (patch) | |
tree | aeeef1186b086a66459727967e2e2d71ff800c92 /lib/Target/MSP430 | |
parent | 262a8627870c38f385944fc2ed9ae365347adf47 (diff) | |
download | external_llvm-a5c177e70a42f48e4885075c4c48aad0816a2817.zip external_llvm-a5c177e70a42f48e4885075c4c48aad0816a2817.tar.gz external_llvm-a5c177e70a42f48e4885075c4c48aad0816a2817.tar.bz2 |
We need to pass the TargetMachine object to the InstPrinter if we are printing
the alias of an InstAlias instead of the thing being aliased. Because we need to
know the features that are valid for an InstAlias.
This is part of a work-in-progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127986 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430')
-rw-r--r-- | lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h | 5 | ||||
-rw-r--r-- | lib/Target/MSP430/MSP430AsmPrinter.cpp | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h b/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h index f0e1ce2..63860dc 100644 --- a/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h +++ b/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h @@ -18,11 +18,12 @@ namespace llvm { class MCOperand; + class TargetMachine; class MSP430InstPrinter : public MCInstPrinter { public: - MSP430InstPrinter(const MCAsmInfo &MAI) : MCInstPrinter(MAI) { - } + MSP430InstPrinter(TargetMachine &TM, const MCAsmInfo &MAI) + : MCInstPrinter(MAI) {} virtual void printInst(const MCInst *MI, raw_ostream &O); diff --git a/lib/Target/MSP430/MSP430AsmPrinter.cpp b/lib/Target/MSP430/MSP430AsmPrinter.cpp index a1a7f44..5264d68 100644 --- a/lib/Target/MSP430/MSP430AsmPrinter.cpp +++ b/lib/Target/MSP430/MSP430AsmPrinter.cpp @@ -164,10 +164,11 @@ void MSP430AsmPrinter::EmitInstruction(const MachineInstr *MI) { } static MCInstPrinter *createMSP430MCInstPrinter(const Target &T, + TargetMachine &TM, unsigned SyntaxVariant, const MCAsmInfo &MAI) { if (SyntaxVariant == 0) - return new MSP430InstPrinter(MAI); + return new MSP430InstPrinter(TM, MAI); return 0; } |