https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/141443
None >From 5748dfe7f68a0778a7b7caeacbf79c2fb3536bd1 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Sun, 25 May 2025 10:41:49 -0700 Subject: [PATCH] [lldb] Use llvm::any_of (NFC) --- lldb/source/Breakpoint/WatchpointResource.cpp | 6 ++---- lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) 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) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits