llvm-project/lldb/source/Commands/CommandObjectLanguage.h
Pete Lawrence 92d8a28cc6
[lldb] Part 2 of 2 - Refactor CommandObject::DoExecute(...) return void (not bool) (#69991)
[lldb] Part 2 of 2 - Refactor `CommandObject::DoExecute(...)` 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 1 refactors the `CommandObject::Execute(...)` method.
- See
[https://github.com/llvm/llvm-project/pull/69989](https://github.com/llvm/llvm-project/pull/69989)

rdar://117378957
2023-10-30 13:21:00 -07:00

27 lines
883 B
C++

//===-- CommandObjectLanguage.h ---------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLDB_SOURCE_COMMANDS_COMMANDOBJECTLANGUAGE_H
#define LLDB_SOURCE_COMMANDS_COMMANDOBJECTLANGUAGE_H
#include "lldb/Interpreter/CommandObjectMultiword.h"
namespace lldb_private {
class CommandObjectLanguage : public CommandObjectMultiword {
public:
CommandObjectLanguage(CommandInterpreter &interpreter);
~CommandObjectLanguage() override;
protected:
void DoExecute(Args &command, CommandReturnObject &result);
};
} // namespace lldb_private
#endif // LLDB_SOURCE_COMMANDS_COMMANDOBJECTLANGUAGE_H