mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-28 06:00:28 +00:00
Remove a memory leak from ThumbTargetMachine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98936 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e8cabf3c2e
commit
c3e45f1ee2
@ -23,6 +23,7 @@
|
||||
#include "ARMISelLowering.h"
|
||||
#include "Thumb1InstrInfo.h"
|
||||
#include "Thumb2InstrInfo.h"
|
||||
#include "llvm/ADT/OwningPtr.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
@ -83,7 +84,8 @@ public:
|
||||
/// Thumb-1 and Thumb-2.
|
||||
///
|
||||
class ThumbTargetMachine : public ARMBaseTargetMachine {
|
||||
ARMBaseInstrInfo *InstrInfo; // either Thumb1InstrInfo or Thumb2InstrInfo
|
||||
// Either Thumb1InstrInfo or Thumb2InstrInfo.
|
||||
OwningPtr<ARMBaseInstrInfo> InstrInfo;
|
||||
const TargetData DataLayout; // Calculates type size & alignment
|
||||
ARMTargetLowering TLInfo;
|
||||
public:
|
||||
@ -100,7 +102,9 @@ public:
|
||||
}
|
||||
|
||||
/// returns either Thumb1InstrInfo or Thumb2InstrInfo
|
||||
virtual const ARMBaseInstrInfo *getInstrInfo() const { return InstrInfo; }
|
||||
virtual const ARMBaseInstrInfo *getInstrInfo() const {
|
||||
return InstrInfo.get();
|
||||
}
|
||||
virtual const TargetData *getTargetData() const { return &DataLayout; }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user