[all-commits] [llvm/llvm-project] 463a02: [lldb] Part 1 of 2 - Refactor `CommandObject::Exec...

Pete Lawrence via All-commits all-commits at lists.llvm.org
Wed Oct 25 15:55:40 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 463a02bc2260d01ac9e8457792bb455e48097ce5
      https://github.com/llvm/llvm-project/commit/463a02bc2260d01ac9e8457792bb455e48097ce5
  Author: Pete Lawrence <plawrence at apple.com>
  Date:   2023-10-25 (Wed, 25 Oct 2023)

  Changed paths:
    M lldb/include/lldb/Interpreter/CommandAlias.h
    M lldb/include/lldb/Interpreter/CommandObject.h
    M lldb/include/lldb/Interpreter/CommandObjectMultiword.h
    M lldb/source/Commands/CommandObjectMultiword.cpp
    M lldb/source/Interpreter/CommandAlias.cpp
    M lldb/source/Interpreter/CommandObject.cpp

  Log Message:
  -----------
  [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (#69989)

[lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` to return
`void` instead of ~~`bool`~~

Justifications:
- The code doesn't ultimately apply the `true`/`false` return values.
- The methods already pass around a `CommandReturnObject`, typically
with a `result` parameter.
- Each command return object already contains:
	- A more precise status
	- The error code(s) that apply to that status

Part 2 refactors the `CommandObject::DoExecute(...)` method.
- See
[https://github.com/llvm/llvm-project/pull/69991](https://github.com/llvm/llvm-project/pull/69991)

rdar://117378957




More information about the All-commits mailing list