Skip to content

Commit 4eb68f5

Browse files
[Instrumentation] Use a range-based for loop (NFC)
1 parent 5a66c8d commit 4eb68f5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,7 @@ void FuncPGOInstrumentation<Edge, BBInfo>::computeCFGHash() {
617617
std::vector<uint8_t> Indexes;
618618
JamCRC JC;
619619
for (auto &BB : F) {
620-
const Instruction *TI = BB.getTerminator();
621-
for (unsigned I = 0, E = TI->getNumSuccessors(); I != E; ++I) {
622-
BasicBlock *Succ = TI->getSuccessor(I);
620+
for (BasicBlock *Succ : successors(&BB)) {
623621
auto BI = findBBInfo(Succ);
624622
if (BI == nullptr)
625623
continue;

0 commit comments

Comments
 (0)