mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	[mips] Fix a memory leak bug report by NAKAMURA Takumi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170012 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -20,6 +20,7 @@ | ||||
| #include "MipsJITInfo.h" | ||||
| #include "MipsSelectionDAGInfo.h" | ||||
| #include "MipsSubtarget.h" | ||||
| #include "llvm/ADT/OwningPtr.h" | ||||
| #include "llvm/DataLayout.h" | ||||
| #include "llvm/Target/TargetFrameLowering.h" | ||||
| #include "llvm/Target/TargetMachine.h" | ||||
| @@ -32,8 +33,8 @@ class MipsRegisterInfo; | ||||
| class MipsTargetMachine : public LLVMTargetMachine { | ||||
|   MipsSubtarget       Subtarget; | ||||
|   const DataLayout    DL; // Calculates type size & alignment | ||||
|   const MipsInstrInfo *InstrInfo; | ||||
|   const MipsFrameLowering *FrameLowering; | ||||
|   OwningPtr<const MipsInstrInfo> InstrInfo; | ||||
|   OwningPtr<const MipsFrameLowering> FrameLowering; | ||||
|   MipsTargetLowering  TLInfo; | ||||
|   MipsSelectionDAGInfo TSInfo; | ||||
|   MipsJITInfo JITInfo; | ||||
| @@ -47,12 +48,12 @@ public: | ||||
|                     CodeGenOpt::Level OL, | ||||
|                     bool isLittle); | ||||
|  | ||||
|   virtual ~MipsTargetMachine() { delete InstrInfo; } | ||||
|   virtual ~MipsTargetMachine() {} | ||||
|  | ||||
|   virtual const MipsInstrInfo *getInstrInfo() const | ||||
|   { return InstrInfo; } | ||||
|   { return InstrInfo.get(); } | ||||
|   virtual const TargetFrameLowering *getFrameLowering() const | ||||
|   { return FrameLowering; } | ||||
|   { return FrameLowering.get(); } | ||||
|   virtual const MipsSubtarget *getSubtargetImpl() const | ||||
|   { return &Subtarget; } | ||||
|   virtual const DataLayout *getDataLayout()    const | ||||
|   | ||||
		Reference in New Issue
	
	Block a user