[lld] [lld] Use llvm::count_if (NFC) (PR #141519)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 26 13:02:55 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-wasm
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/141519.diff
1 Files Affected:
- (modified) lld/wasm/InputChunks.cpp (+3-3)
``````````diff
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.
``````````
</details>
https://github.com/llvm/llvm-project/pull/141519
More information about the llvm-commits
mailing list