Skip to content

Commit aa530c7

Browse files
[Passes] Use a range-based for loop with llvm::successors (NFC)
1 parent 8121835 commit aa530c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Passes/StandardInstrumentations.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2119,8 +2119,8 @@ DCData::DCData(const BasicBlock &B) {
21192119
addSuccessorLabel(C.getCaseSuccessor()->getName().str(), Value);
21202120
}
21212121
} else
2122-
for (const_succ_iterator I = succ_begin(&B), E = succ_end(&B); I != E; ++I)
2123-
addSuccessorLabel((*I)->getName().str(), "");
2122+
for (const BasicBlock *Succ : successors(&B))
2123+
addSuccessorLabel(Succ->getName().str(), "");
21242124
}
21252125

21262126
DotCfgChangeReporter::DotCfgChangeReporter(bool Verbose)

0 commit comments

Comments
 (0)