[Lldb-commits] [lldb] 85cbf74 - [lldb] Use llvm::any_of (NFC) (#141443)
via lldb-commits
lldb-commits at lists.llvm.org
Mon May 26 09:13:21 PDT 2025
Author: Kazu Hirata
Date: 2025-05-26T09:13:17-07:00
New Revision: 85cbf742f9dab78808c0093ca85031acbf55e250
URL: https://github.com/llvm/llvm-project/commit/85cbf742f9dab78808c0093ca85031acbf55e250
DIFF: https://github.com/llvm/llvm-project/commit/85cbf742f9dab78808c0093ca85031acbf55e250.diff
LOG: [lldb] Use llvm::any_of (NFC) (#141443)
Added:
Modified:
lldb/source/Breakpoint/WatchpointResource.cpp
lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
Removed:
################################################################################
diff --git a/lldb/source/Breakpoint/WatchpointResource.cpp b/lldb/source/Breakpoint/WatchpointResource.cpp
index fa0442997b528..49d9d12aadfc3 100644
--- a/lldb/source/Breakpoint/WatchpointResource.cpp
+++ b/lldb/source/Breakpoint/WatchpointResource.cpp
@@ -73,10 +73,8 @@ bool WatchpointResource::ConstituentsContains(const WatchpointSP &wp_sp) {
bool WatchpointResource::ConstituentsContains(const Watchpoint *wp) {
std::lock_guard<std::mutex> guard(m_constituents_mutex);
- WatchpointCollection::const_iterator match =
- std::find_if(m_constituents.begin(), m_constituents.end(),
- [&wp](const WatchpointSP &x) { return x.get() == wp; });
- return match != m_constituents.end();
+ return llvm::any_of(m_constituents,
+ [&wp](const WatchpointSP &x) { return x.get() == wp; });
}
WatchpointSP WatchpointResource::GetConstituentAtIndex(size_t idx) {
diff --git a/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp b/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
index 3bafb21f7c33a..b9e7c698cdec0 100644
--- a/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
+++ b/lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp
@@ -177,8 +177,8 @@ void ABIAArch64::AugmentRegisterInfo(
lldb::eFormatHex);
auto bool_predicate = [](const auto ®_num) { return bool(reg_num); };
- bool saw_v_regs = std::any_of(v_regs.begin(), v_regs.end(), bool_predicate);
- bool saw_z_regs = std::any_of(z_regs.begin(), z_regs.end(), bool_predicate);
+ bool saw_v_regs = llvm::any_of(v_regs, bool_predicate);
+ bool saw_z_regs = llvm::any_of(z_regs, bool_predicate);
// Sn/Dn for Vn.
if (saw_v_regs) {
More information about the lldb-commits
mailing list