Skip to content

Commit 6a3d32b

Browse files
committed
Fix use of worklist
1 parent 808c9fa commit 6a3d32b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/SILOptimizer/IPO/GlobalOpt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,8 +1160,8 @@ bool SILGlobalOpt::run() {
11601160
}
11611161

11621162
// Erase the instructions that we have marked for deletion.
1163-
while (auto *inst = InstToRemove.pop_back_val()) {
1164-
inst->eraseFromParent();
1163+
while (!InstToRemove.isEmpty()) {
1164+
InstToRemove.pop_back_val()->eraseFromParent();
11651165
}
11661166

11671167
// After we erase some instructions, re-collect.

0 commit comments

Comments
 (0)