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 b537c5b commit 3f7aea1Copy full SHA for 3f7aea1
llvm/lib/Transforms/Scalar/DFAJumpThreading.cpp
@@ -620,13 +620,9 @@ struct AllSwitchPaths {
620
// Some blocks have multiple edges to the same successor, and this set
621
// is used to prevent a duplicate path from being generated
622
SmallSet<BasicBlock *, 4> Successors;
623
-
624
- for (succ_iterator SI = succ_begin(BB), E = succ_end(BB); SI != E; ++SI) {
625
- BasicBlock *Succ = *SI;
626
627
- if (Successors.find(Succ) != Successors.end())
+ for (BasicBlock *Succ : successors(BB)) {
+ if (!Successors.insert(Succ).second)
628
continue;
629
- Successors.insert(Succ);
630
631
// Found a cycle through the SwitchBlock
632
if (Succ == SwitchBlock) {
0 commit comments