Skip to content

Commit b78824a

Browse files
[llvm-profdata] Use a range-based for loop (NFC) (#168672)
Identified with modernize-loop-convert.
1 parent 1d474e4 commit b78824a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/tools/llvm-profdata/llvm-profdata.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2929,9 +2929,9 @@ static int showInstrProfile(ShowFormat SFormat, raw_fd_ostream &OS) {
29292929
continue;
29302930
}
29312931

2932-
for (size_t I = 0, E = Func.Counts.size(); I < E; ++I) {
2933-
FuncMax = std::max(FuncMax, Func.Counts[I]);
2934-
FuncSum += Func.Counts[I];
2932+
for (uint64_t Count : Func.Counts) {
2933+
FuncMax = std::max(FuncMax, Count);
2934+
FuncSum += Count;
29352935
}
29362936

29372937
if (FuncMax < ShowValueCutoff) {

0 commit comments

Comments
 (0)