Skip to content

Commit a277d24

Browse files
[ProfileData] Use llvm::count (NFC) (llvm#146013)
llvm::count is shorter than llvm::count_if plus a lambda.
1 parent c7b34b0 commit a277d24

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,9 +499,7 @@ struct MCDCRecord {
499499
/// vectors.
500500
std::pair<unsigned, unsigned> getDecisions() const {
501501
const unsigned TrueDecisions =
502-
std::count_if(TV.begin(), TV.end(), [](const auto &TestVec) {
503-
return TestVec.second == CondState::MCDC_True;
504-
});
502+
llvm::count(llvm::make_second_range(TV), CondState::MCDC_True);
505503

506504
return {TrueDecisions, TV.size() - TrueDecisions};
507505
}

0 commit comments

Comments
 (0)