Skip to content

Commit

Permalink
[Transforms] Use a range-based for loop (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Jan 28, 2024
1 parent d6ad67d commit 687136e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions llvm/lib/Transforms/Utils/PredicateInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,8 @@ void PredicateInfoBuilder::processSwitch(

// Remember how many outgoing edges there are to every successor.
SmallDenseMap<BasicBlock *, unsigned, 16> SwitchEdges;
for (unsigned i = 0, e = SI->getNumSuccessors(); i != e; ++i) {
BasicBlock *TargetBlock = SI->getSuccessor(i);
for (BasicBlock *TargetBlock : successors(BranchBB))
++SwitchEdges[TargetBlock];
}

// Now propagate info for each case value
for (auto C : SI->cases()) {
Expand Down

0 comments on commit 687136e

Please sign in to comment.