diff options
author | Alex Langford <alangford@apple.com> | 2024-01-26 10:19:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-26 10:19:03 -0800 |
commit | 5f22d3356cda0a9b1521c839c006f61b5cc504fc (patch) | |
tree | 87c5501af134ec4b3b16804a4bd01d799c3b65a9 /lldb/source/Commands/CommandObjectBreakpoint.cpp | |
parent | 7f518ee9eaa53fcd475e374aaed05ada4573d115 (diff) | |
download | llvm-5f22d3356cda0a9b1521c839c006f61b5cc504fc.zip llvm-5f22d3356cda0a9b1521c839c006f61b5cc504fc.tar.gz llvm-5f22d3356cda0a9b1521c839c006f61b5cc504fc.tar.bz2 |
[lldb][NFCI] Change BreakpointIDList::FindBreakpointID to BreakpointIDList::Contains (#79517)
`FindBreakpointID` take a BreakpointID and a pointer to a size_t (so you
can get position information). It returns a bool to indicate whether the
id was found in the list or not.
There are 2 callers of this currently and neither one actually uses the
position information, so I removed it. After that, I renamed it to
Contains to more accurately reflect the intent. Additionally, I changed
the argument type from a reference to a value (because BreakpointID is
just a wrapper around 2 integers, copies are cheap).
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 1661d5d..3fdf5cd 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -1485,9 +1485,8 @@ protected: for (auto breakpoint_sp : breakpoints.Breakpoints()) { if (!breakpoint_sp->IsEnabled() && breakpoint_sp->AllowDelete()) { BreakpointID bp_id(breakpoint_sp->GetID()); - size_t pos = 0; - if (!excluded_bp_ids.FindBreakpointID(bp_id, &pos)) - valid_bp_ids.AddBreakpointID(breakpoint_sp->GetID()); + if (!excluded_bp_ids.Contains(bp_id)) + valid_bp_ids.AddBreakpointID(bp_id); } } if (valid_bp_ids.GetSize() == 0) { |