mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 16:36:06 +00:00

[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
32 lines
904 B
C++
32 lines
904 B
C++
//===-- CommandObjectApropos.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_COMMANDOBJECTAPROPOS_H
|
|
#define LLDB_SOURCE_COMMANDS_COMMANDOBJECTAPROPOS_H
|
|
|
|
#include "lldb/Interpreter/CommandObject.h"
|
|
|
|
namespace lldb_private {
|
|
|
|
// CommandObjectApropos
|
|
|
|
class CommandObjectApropos : public CommandObjectParsed {
|
|
public:
|
|
CommandObjectApropos(CommandInterpreter &interpreter);
|
|
|
|
~CommandObjectApropos() override;
|
|
|
|
protected:
|
|
void DoExecute(Args &command, CommandReturnObject &result) override;
|
|
};
|
|
|
|
} // namespace lldb_private
|
|
|
|
#endif // LLDB_SOURCE_COMMANDS_COMMANDOBJECTAPROPOS_H
|