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/CommandObjectProcess.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/CommandObjectProcess.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectProcess.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 6dc7648f..c7b874d 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -646,9 +646,7 @@ protected: for (size_t loc_idx = 0; loc_idx < num_locations; loc_idx++) { BreakpointLocationSP loc_sp = bp_sp->GetLocationAtIndex(loc_idx); tmp_id.SetBreakpointLocationID(loc_idx); - size_t position = 0; - if (!with_locs.FindBreakpointID(tmp_id, &position) - && loc_sp->IsEnabled()) { + if (!with_locs.Contains(tmp_id) && loc_sp->IsEnabled()) { locs_disabled.push_back(tmp_id); loc_sp->SetEnabled(false); } |