File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
lib/SILOptimizer/Mandatory Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -283,12 +283,8 @@ void DiagnosticEmitter::emitMissingConsumeInDiscardingContext(
283
283
// / \ / \
284
284
// d d . .
285
285
//
286
- BasicBlockSet visited (destroyPoint->getFunction ());
287
- std::deque<SILBasicBlock *> bfsWorklist = {destroyPoint->getParent ()};
288
- while (auto *bb = bfsWorklist.front ()) {
289
- visited.insert (bb);
290
- bfsWorklist.pop_front ();
291
-
286
+ BasicBlockWorkqueue bfsWorklist = {destroyPoint->getParent ()};
287
+ while (auto *bb = bfsWorklist.pop ()) {
292
288
TermInst *term = bb->getTerminator ();
293
289
294
290
// Looking for a block that exits the function or terminates the program.
@@ -308,8 +304,7 @@ void DiagnosticEmitter::emitMissingConsumeInDiscardingContext(
308
304
}
309
305
310
306
for (auto *nextBB : term->getSuccessorBlocks ())
311
- if (!visited.contains (nextBB))
312
- bfsWorklist.push_back (nextBB);
307
+ bfsWorklist.pushIfNotVisited (nextBB);
313
308
}
314
309
}
315
310
You can’t perform that action at this time.
0 commit comments