Skip to content

Commit 742e84d

Browse files
authored
SelectionDAG: Use unique_ptr for SwiftErrorValueTracking (#142532)
1 parent ba57ff6 commit 742e84d

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

llvm/include/llvm/CodeGen/SelectionDAGISel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class SelectionDAGISel {
4747
TargetMachine &TM;
4848
const TargetLibraryInfo *LibInfo;
4949
std::unique_ptr<FunctionLoweringInfo> FuncInfo;
50-
SwiftErrorValueTracking *SwiftError;
50+
std::unique_ptr<SwiftErrorValueTracking> SwiftError;
5151
MachineFunction *MF;
5252
MachineModuleInfo *MMI;
5353
MachineRegisterInfo *RegInfo;

llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,7 @@ SelectionDAGISel::SelectionDAGISel(TargetMachine &tm, CodeGenOptLevel OL)
386386
initializeTargetLibraryInfoWrapperPassPass(*PassRegistry::getPassRegistry());
387387
}
388388

389-
SelectionDAGISel::~SelectionDAGISel() {
390-
delete CurDAG;
391-
delete SwiftError;
392-
}
389+
SelectionDAGISel::~SelectionDAGISel() { delete CurDAG; }
393390

394391
void SelectionDAGISelLegacy::getAnalysisUsage(AnalysisUsage &AU) const {
395392
CodeGenOptLevel OptLevel = Selector->OptLevel;

0 commit comments

Comments
 (0)