Skip to content

Commit 16b1765

Browse files
committed
[constant-folding] Remove unneeded code.
recursivelyDeleteTriviallyDeadInstructions will handle this for us when it deletes the instruction. So in fact, this was actually a use of an invalid pointer. Good thing we never dereferenced it.
1 parent 0161f43 commit 16b1765

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/SILOptimizer/Utils/ConstantFolding.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,6 @@ bool ConstantFolder::constantFoldStringConcatenation(ApplyInst *AI) {
15011501
assert(DeadI);
15021502
recursivelyDeleteTriviallyDeadInstructions(DeadI, /*force*/ true,
15031503
RemoveCallback);
1504-
WorkList.remove(DeadI);
15051504
}
15061505
}
15071506
// Schedule users of the new instruction for constant folding.

0 commit comments

Comments
 (0)