File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed
include/swift/SILOptimizer/Utils Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ class InstructionDeleter {
159
159
// /
160
160
// / Calls callbacks.notifyWillBeDeleted().
161
161
bool deleteIfDead (SILInstruction *inst);
162
+ bool deleteIfDead (SILInstruction *inst, bool fixLifetime);
162
163
163
164
// / Delete the instruction \p inst, ignoring its side effects. If any operand
164
165
// / definitions will become dead after deleting this instruction, track them
Original file line number Diff line number Diff line change @@ -276,6 +276,10 @@ void InstructionDeleter::cleanupDeadInstructions() {
276
276
277
277
bool InstructionDeleter::deleteIfDead (SILInstruction *inst) {
278
278
bool fixLifetime = inst->getFunction ()->hasOwnership ();
279
+ return deleteIfDead (inst, fixLifetime);
280
+ }
281
+
282
+ bool InstructionDeleter::deleteIfDead (SILInstruction *inst, bool fixLifetime) {
279
283
if (isInstructionTriviallyDead (inst)
280
284
|| isScopeAffectingInstructionDead (inst, fixLifetime)) {
281
285
getCallbacks ().notifyWillBeDeleted (inst);
You can’t perform that action at this time.
0 commit comments