We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26d8262 commit d830aa9Copy full SHA for d830aa9
lib/SILOptimizer/SILCombiner/SILCombinerApplyVisitors.cpp
@@ -80,7 +80,9 @@ SILInstruction *SILCombiner::visitPartialApplyInst(PartialApplyInst *PAI) {
80
PAI->getType());
81
82
// Remove dealloc_stack of partial_apply [stack].
83
- for (auto *Use : PAI->getUses())
+ // Iterating while delete use a copy.
84
+ SmallVector<Operand *, 8> Uses(PAI->getUses());
85
+ for (auto *Use : Uses)
86
if (auto *dealloc = dyn_cast<DeallocStackInst>(Use->getUser()))
87
eraseInstFromFunction(*dealloc);
88
auto *thinToThick = Builder.createThinToThickFunction(
0 commit comments