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 {
159159 // /
160160 // / Calls callbacks.notifyWillBeDeleted().
161161 bool deleteIfDead (SILInstruction *inst);
162+ bool deleteIfDead (SILInstruction *inst, bool fixLifetime);
162163
163164 // / Delete the instruction \p inst, ignoring its side effects. If any operand
164165 // / 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() {
276276
277277bool InstructionDeleter::deleteIfDead (SILInstruction *inst) {
278278 bool fixLifetime = inst->getFunction ()->hasOwnership ();
279+ return deleteIfDead (inst, fixLifetime);
280+ }
281+
282+ bool InstructionDeleter::deleteIfDead (SILInstruction *inst, bool fixLifetime) {
279283 if (isInstructionTriviallyDead (inst)
280284 || isScopeAffectingInstructionDead (inst, fixLifetime)) {
281285 getCallbacks ().notifyWillBeDeleted (inst);
You can’t perform that action at this time.
0 commit comments