aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Mips/MipsTargetMachine.h
diff options
context:
space:
mode:
authorAkira Hatanaka <ahatanaka@mips.com>2012-07-31 21:49:49 +0000
committerAkira Hatanaka <ahatanaka@mips.com>2012-07-31 21:49:49 +0000
commit0bc1adbbc4fdc6d85a671ed70a1bbd345dba445d (patch)
treebff519453a5ba3fad9afa0ba5a6ed76668e29d64 /lib/Target/Mips/MipsTargetMachine.h
parentb4f921b1f0ae34d6cfda6034a7d32c73b0738351 (diff)
Add definitions of two subclasses of MipsInstrInfo, MipsInstrInfo (for mips16),
and MipsSEInstrInfo (for mips32/64). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsTargetMachine.h')
-rw-r--r--lib/Target/Mips/MipsTargetMachine.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/Target/Mips/MipsTargetMachine.h b/lib/Target/Mips/MipsTargetMachine.h
index bae52ffdda..958f13624e 100644
--- a/lib/Target/Mips/MipsTargetMachine.h
+++ b/lib/Target/Mips/MipsTargetMachine.h
@@ -25,12 +25,13 @@
#include "llvm/Target/TargetFrameLowering.h"
namespace llvm {
- class formatted_raw_ostream;
+class formatted_raw_ostream;
+class MipsRegisterInfo;
class MipsTargetMachine : public LLVMTargetMachine {
MipsSubtarget Subtarget;
const TargetData DataLayout; // Calculates type size & alignment
- MipsInstrInfo InstrInfo;
+ const MipsInstrInfo *InstrInfo;
MipsFrameLowering FrameLowering;
MipsTargetLowering TLInfo;
MipsSelectionDAGInfo TSInfo;
@@ -43,8 +44,10 @@ public:
CodeGenOpt::Level OL,
bool isLittle);
+ virtual ~MipsTargetMachine() { delete InstrInfo; }
+
virtual const MipsInstrInfo *getInstrInfo() const
- { return &InstrInfo; }
+ { return InstrInfo; }
virtual const TargetFrameLowering *getFrameLowering() const
{ return &FrameLowering; }
virtual const MipsSubtarget *getSubtargetImpl() const
@@ -55,7 +58,7 @@ public:
{ return &JITInfo; }
virtual const MipsRegisterInfo *getRegisterInfo() const {
- return &InstrInfo.getRegisterInfo();
+ return &InstrInfo->getRegisterInfo();
}
virtual const MipsTargetLowering *getTargetLowering() const {