Skip to content

Commit eeb0e9f

Browse files
[Analysis] Use llvm::successors (NFC)
1 parent d7ff7c3 commit eeb0e9f

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Analysis/InlineCost.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,9 +2819,8 @@ InlineResult CallAnalyzer::analyze() {
28192819

28202820
// If we're unable to select a particular successor, just count all of
28212821
// them.
2822-
for (unsigned TIdx = 0, TSize = TI->getNumSuccessors(); TIdx != TSize;
2823-
++TIdx)
2824-
BBWorklist.insert(TI->getSuccessor(TIdx));
2822+
for (BasicBlock *Succ : successors(BB))
2823+
BBWorklist.insert(Succ);
28252824

28262825
onBlockAnalyzed(BB);
28272826
}

0 commit comments

Comments
 (0)