[all-commits] [llvm/llvm-project] 176d07: [lldb][NFCI] Constrain EventDataBytes creation (#7...

Alex Langford via All-commits all-commits at lists.llvm.org
Fri Jan 26 10:21:05 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 176d07d360094b366b25cc009846ec64ac7d8040
      https://github.com/llvm/llvm-project/commit/176d07d360094b366b25cc009846ec64ac7d8040
  Author: Alex Langford <alangford at apple.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M lldb/include/lldb/Utility/Event.h
    M lldb/source/API/SBEvent.cpp
    M lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    M lldb/source/Utility/Event.cpp

  Log Message:
  -----------
  [lldb][NFCI] Constrain EventDataBytes creation (#79508)

There are 3 ways to create an EventDataBytes object: (const char *),
(llvm::StringRef), and (const void *, size_t len). All of these cases
can be handled under `llvm::StringRef`. Additionally, this allows us to
remove the otherwise unused `SetBytes`, `SwapBytes`, and
`SetBytesFromCString` methods.




More information about the All-commits mailing list