1717#include " CSKYISelLowering.h"
1818#include " CSKYInstrInfo.h"
1919#include " CSKYRegisterInfo.h"
20- #include " llvm/CodeGen/SelectionDAGTargetInfo.h"
2120#include " llvm/CodeGen/TargetSubtargetInfo.h"
2221#include " llvm/Target/TargetMachine.h"
2322
@@ -34,7 +33,7 @@ class CSKYSubtarget : public CSKYGenSubtargetInfo {
3433 CSKYInstrInfo InstrInfo;
3534 CSKYRegisterInfo RegInfo;
3635 CSKYTargetLowering TLInfo;
37- SelectionDAGTargetInfo TSInfo;
36+ std::unique_ptr< const SelectionDAGTargetInfo> TSInfo;
3837
3938 enum CSKYProcFamilyEnum {
4039 Others,
@@ -112,6 +111,8 @@ class CSKYSubtarget : public CSKYGenSubtargetInfo {
112111 CSKYSubtarget (const Triple &TT, StringRef CPU, StringRef TuneCPU,
113112 StringRef FS, const TargetMachine &TM);
114113
114+ ~CSKYSubtarget () override ;
115+
115116 const CSKYFrameLowering *getFrameLowering () const override {
116117 return &FrameLowering;
117118 }
@@ -120,9 +121,8 @@ class CSKYSubtarget : public CSKYGenSubtargetInfo {
120121 const CSKYTargetLowering *getTargetLowering () const override {
121122 return &TLInfo;
122123 }
123- const SelectionDAGTargetInfo *getSelectionDAGInfo () const override {
124- return &TSInfo;
125- }
124+
125+ const SelectionDAGTargetInfo *getSelectionDAGInfo () const override ;
126126
127127 // / Initializes using the passed in CPU and feature strings so that we can
128128 // / use initializer lists for subtarget initialization.
0 commit comments