[all-commits] [llvm/llvm-project] 07d6fb: [lldb][NFCI] Remove BreakpointIDList::InsertString...

Alex Langford via All-commits all-commits at lists.llvm.org
Mon Jan 8 10:51:11 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 07d6fbf8d80083470b4371f2ddabd656a9c317e6
      https://github.com/llvm/llvm-project/commit/07d6fbf8d80083470b4371f2ddabd656a9c317e6
  Author: Alex Langford <alangford at apple.com>
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
    M lldb/include/lldb/Breakpoint/BreakpointIDList.h
    M lldb/source/Breakpoint/BreakpointIDList.cpp
    M lldb/source/Commands/CommandObjectBreakpoint.cpp

  Log Message:
  -----------
  [lldb][NFCI] Remove BreakpointIDList::InsertStringArray (#77161)

This abstraction is leaky and BreakpointIDList does not need to know
about CommandReturnObject.
Additionally, setting the CommandReturnObject inout param to a success
state does very little. The function returns immediately if the input
ArrayRef is empty, and reading
CommandObjectMultiwordBreakpoint::VerifyIDs more closely, the input is
always empty if the previous call to
BreakpointIDList::FindAndReplaceIDRanges failed. If the call was
successful, then the CommandReturnObject is already in a success state.

I have opted to remove the function altogether and inline the
functionality where it was used.




More information about the All-commits mailing list