Skip to content

[lldb][NFCI] Remove BreakpointIDList::InsertStringArray #77161

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions lldb/include/lldb/Breakpoint/BreakpointIDList.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ class BreakpointIDList {

bool FindBreakpointID(const char *bp_id, size_t *position) const;

void InsertStringArray(llvm::ArrayRef<const char *> string_array,
CommandReturnObject &result);

// Returns a pair consisting of the beginning and end of a breakpoint
// ID range expression. If the input string is not a valid specification,
// returns an empty pair.
Expand Down
13 changes: 0 additions & 13 deletions lldb/source/Breakpoint/BreakpointIDList.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,6 @@ bool BreakpointIDList::FindBreakpointID(const char *bp_id_str,
return FindBreakpointID(*bp_id, position);
}

void BreakpointIDList::InsertStringArray(
llvm::ArrayRef<const char *> string_array, CommandReturnObject &result) {
if(string_array.empty())
return;

for (const char *str : string_array) {
auto bp_id = BreakpointID::ParseCanonicalReference(str);
if (bp_id)
m_breakpoint_ids.push_back(*bp_id);
}
result.SetStatus(eReturnStatusSuccessFinishNoResult);
}

// This function takes OLD_ARGS, which is usually the result of breaking the
// command string arguments into
// an array of space-separated strings, and searches through the arguments for
Expand Down
4 changes: 3 additions & 1 deletion lldb/source/Commands/CommandObjectBreakpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2494,7 +2494,9 @@ void CommandObjectMultiwordBreakpoint::VerifyIDs(
// NOW, convert the list of breakpoint id strings in TEMP_ARGS into an actual
// BreakpointIDList:

valid_ids->InsertStringArray(temp_args.GetArgumentArrayRef(), result);
for (llvm::StringRef temp_arg : temp_args.GetArgumentArrayRef())
if (auto bp_id = BreakpointID::ParseCanonicalReference(temp_arg))
valid_ids->AddBreakpointID(*bp_id);

// At this point, all of the breakpoint ids that the user passed in have
// been converted to breakpoint IDs and put into valid_ids.
Expand Down