diff options
author | Eric Christopher <echristo@gmail.com> | 2014-06-10 23:26:47 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2014-06-10 23:26:47 +0000 |
commit | cd996edec561e2c862aa3398ab9b39de0ef21b35 (patch) | |
tree | 42b20185abdc10bdf34326cf6ceff46d8c82c7cb /llvm/lib/Target/X86/X86Subtarget.h | |
parent | 841da851985b88195c04ce0b09448721ecc964a4 (diff) | |
download | bcm5719-llvm-cd996edec561e2c862aa3398ab9b39de0ef21b35.tar.gz bcm5719-llvm-cd996edec561e2c862aa3398ab9b39de0ef21b35.zip |
Use unique_ptr for X86Subtarget pointer members.
llvm-svn: 210606
Diffstat (limited to 'llvm/lib/Target/X86/X86Subtarget.h')
-rw-r--r-- | llvm/lib/Target/X86/X86Subtarget.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 9e4200c110a..85da720cbc2 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -229,10 +229,10 @@ private: // Calculates type size & alignment const DataLayout DL; X86SelectionDAGInfo TSInfo; - X86TargetLowering *TLInfo; - X86InstrInfo *InstrInfo; - X86FrameLowering *FrameLowering; - X86JITInfo *JITInfo; + std::unique_ptr<X86TargetLowering> TLInfo; + std::unique_ptr<X86InstrInfo> InstrInfo; + std::unique_ptr<X86FrameLowering> FrameLowering; + std::unique_ptr<X86JITInfo> JITInfo; public: /// This constructor initializes the data members to match that @@ -241,14 +241,15 @@ public: X86Subtarget(const std::string &TT, const std::string &CPU, const std::string &FS, X86TargetMachine &TM, unsigned StackAlignOverride); - ~X86Subtarget(); - const X86TargetLowering *getTargetLowering() const { return TLInfo; } - const X86InstrInfo *getInstrInfo() const { return InstrInfo; } + const X86TargetLowering *getTargetLowering() const { return TLInfo.get(); } + const X86InstrInfo *getInstrInfo() const { return InstrInfo.get(); } const DataLayout *getDataLayout() const { return &DL; } - const X86FrameLowering *getFrameLowering() const { return FrameLowering; } + const X86FrameLowering *getFrameLowering() const { + return FrameLowering.get(); + } const X86SelectionDAGInfo *getSelectionDAGInfo() const { return &TSInfo; } - X86JITInfo *getJITInfo() { return JITInfo; } + X86JITInfo *getJITInfo() { return JITInfo.get(); } /// getStackAlignment - Returns the minimum alignment known to hold of the /// stack frame on entry to the function and which must be maintained by every |