[llvm] a5dca53 - Use llvm::count (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 22 21:18:34 PDT 2023
Author: Kazu Hirata
Date: 2023-10-22T21:18:23-07:00
New Revision: a5dca533bdc32258d3f3334cdec44f0ac9028251
URL: https://github.com/llvm/llvm-project/commit/a5dca533bdc32258d3f3334cdec44f0ac9028251
DIFF: https://github.com/llvm/llvm-project/commit/a5dca533bdc32258d3f3334cdec44f0ac9028251.diff
LOG: Use llvm::count (NFC)
Added:
Modified:
clang/utils/TableGen/SveEmitter.cpp
llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
Removed:
################################################################################
diff --git a/clang/utils/TableGen/SveEmitter.cpp b/clang/utils/TableGen/SveEmitter.cpp
index ab2b22233987a3c..1421a5b03ed6665 100644
--- a/clang/utils/TableGen/SveEmitter.cpp
+++ b/clang/utils/TableGen/SveEmitter.cpp
@@ -195,7 +195,7 @@ class Intrinsic {
ArrayRef<SVEType> getTypes() const { return Types; }
SVEType getParamType(unsigned I) const { return Types[I + 1]; }
unsigned getNumParams() const {
- return Proto.size() - (2 * std::count(Proto.begin(), Proto.end(), '.')) - 1;
+ return Proto.size() - (2 * llvm::count(Proto, '.')) - 1;
}
uint64_t getFlags() const { return Flags; }
diff --git a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
index 3ab21ad26d85e6f..e06c1552e14aa07 100644
--- a/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+++ b/llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
@@ -2093,8 +2093,7 @@ void CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::identifyClones(
for (auto &Edge : CallerEdges) {
// Skip any that have been removed by an earlier recursive call.
if (Edge->Callee == nullptr && Edge->Caller == nullptr) {
- assert(!std::count(Node->CallerEdges.begin(), Node->CallerEdges.end(),
- Edge));
+ assert(!llvm::count(Node->CallerEdges, Edge));
continue;
}
// Ignore any caller we previously visited via another edge.
More information about the llvm-commits
mailing list