This patch changes the ownership of TLOF from TargetLoweringBase to TargetMachine...
[oota-llvm.git] / lib / Target / Mips / MipsTargetMachine.h
index 5ddbbcccfbbe154612fe04db5b5b2e0dbcf1ba6d..2b64600bca5c0890380fa4d2ce257422f05a334a 100644 (file)
@@ -26,6 +26,7 @@ class MipsRegisterInfo;
 
 class MipsTargetMachine : public LLVMTargetMachine {
   bool isLittle;
+  std::unique_ptr<TargetLoweringObjectFile> TLOF;
   MipsSubtarget *Subtarget;
   MipsSubtarget DefaultSubtarget;
   MipsSubtarget NoMips16Subtarget;
@@ -38,8 +39,6 @@ public:
                     const TargetOptions &Options, Reloc::Model RM,
                     CodeModel::Model CM, CodeGenOpt::Level OL, bool isLittle);
 
-  virtual ~MipsTargetMachine() {}
-
   void addAnalysisPasses(PassManagerBase &PM) override;
 
   const MipsSubtarget *getSubtargetImpl() const override {
@@ -55,6 +54,10 @@ public:
 
   // Pass Pipeline Configuration
   TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
+
+  TargetLoweringObjectFile *getObjFileLowering() const override {
+    return TLOF.get();
+  }
 };
 
 /// MipsebTargetMachine - Mips32/64 big endian target machine.