[lld] [lld] Use llvm::count_if (NFC) (PR #141519)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 13:02:22 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141519
None
>From 8b6cb30fab052b6ecc43fb697170ebccc7c80c1d Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Mon, 26 May 2025 09:43:43 -0700
Subject: [PATCH] [lld] Use llvm::count_if (NFC)
---
lld/wasm/InputChunks.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lld/wasm/InputChunks.cpp b/lld/wasm/InputChunks.cpp
index ffab83e636392..855589353e4f6 100644
--- a/lld/wasm/InputChunks.cpp
+++ b/lld/wasm/InputChunks.cpp
@@ -174,9 +174,9 @@ static bool relocIsLive(const WasmRelocation &rel, ObjFile *file) {
}
size_t InputChunk::getNumLiveRelocations() const {
- return std::count_if(
- relocations.begin(), relocations.end(),
- [this](const WasmRelocation &rel) { return relocIsLive(rel, file); });
+ return llvm::count_if(relocations, [this](const WasmRelocation &rel) {
+ return relocIsLive(rel, file);
+ });
}
// Copy relocation entries to a given output stream.
More information about the llvm-commits
mailing list