Skip to content

Commit 85cbf74

Browse files
[lldb] Use llvm::any_of (NFC) (#141443)
1 parent 36d9180 commit 85cbf74

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lldb/source/Breakpoint/WatchpointResource.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,8 @@ bool WatchpointResource::ConstituentsContains(const WatchpointSP &wp_sp) {
7373

7474
bool WatchpointResource::ConstituentsContains(const Watchpoint *wp) {
7575
std::lock_guard<std::mutex> guard(m_constituents_mutex);
76-
WatchpointCollection::const_iterator match =
77-
std::find_if(m_constituents.begin(), m_constituents.end(),
78-
[&wp](const WatchpointSP &x) { return x.get() == wp; });
79-
return match != m_constituents.end();
76+
return llvm::any_of(m_constituents,
77+
[&wp](const WatchpointSP &x) { return x.get() == wp; });
8078
}
8179

8280
WatchpointSP WatchpointResource::GetConstituentAtIndex(size_t idx) {

lldb/source/Plugins/ABI/AArch64/ABIAArch64.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ void ABIAArch64::AugmentRegisterInfo(
177177
lldb::eFormatHex);
178178

179179
auto bool_predicate = [](const auto &reg_num) { return bool(reg_num); };
180-
bool saw_v_regs = std::any_of(v_regs.begin(), v_regs.end(), bool_predicate);
181-
bool saw_z_regs = std::any_of(z_regs.begin(), z_regs.end(), bool_predicate);
180+
bool saw_v_regs = llvm::any_of(v_regs, bool_predicate);
181+
bool saw_z_regs = llvm::any_of(z_regs, bool_predicate);
182182

183183
// Sn/Dn for Vn.
184184
if (saw_v_regs) {

0 commit comments

Comments
 (0)