diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2023-04-14 21:41:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-06-22 18:20:56 +0000 |
commit | bdd1243df58e60e85101c09001d9812a789b6bc4 (patch) | |
tree | a1ce621c7301dd47ba2ddc3b8eaa63b441389481 /contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp | |
parent | 781624ca2d054430052c828ba8d2c2eaf2d733e7 (diff) | |
parent | e3b557809604d036af6e00c60f012c2025b59a5e (diff) |
Diffstat (limited to 'contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r-- | contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp b/contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp index e4fdb7365e72..bae2717ffe68 100644 --- a/contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/contrib/llvm-project/lldb/source/Commands/CommandObjectMultiword.cpp @@ -10,6 +10,7 @@ #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" #include "lldb/Interpreter/Options.h" +#include <optional> using namespace lldb; using namespace lldb_private; @@ -173,11 +174,6 @@ bool CommandObjectMultiword::Execute(const char *args_string, return result.Succeeded(); } - if (sub_command.equals_insensitive("help")) { - this->CommandObject::GenerateHelpText(result); - return result.Succeeded(); - } - if (m_subcommand_dict.empty()) { result.AppendErrorWithFormat("'%s' does not have any subcommands.\n", GetCommandName().str().c_str()); @@ -290,16 +286,16 @@ void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) { sub_command_object->HandleCompletion(request); } -llvm::Optional<std::string> +std::optional<std::string> CommandObjectMultiword::GetRepeatCommand(Args ¤t_command_args, uint32_t index) { index++; if (current_command_args.GetArgumentCount() <= index) - return llvm::None; + return std::nullopt; CommandObject *sub_command_object = GetSubcommandObject(current_command_args[index].ref()); if (sub_command_object == nullptr) - return llvm::None; + return std::nullopt; return sub_command_object->GetRepeatCommand(current_command_args, index); } @@ -420,13 +416,13 @@ void CommandObjectProxy::HandleArgumentCompletion( proxy_command->HandleArgumentCompletion(request, opt_element_vector); } -llvm::Optional<std::string> +std::optional<std::string> CommandObjectProxy::GetRepeatCommand(Args ¤t_command_args, uint32_t index) { CommandObject *proxy_command = GetProxyCommandObject(); if (proxy_command) return proxy_command->GetRepeatCommand(current_command_args, index); - return llvm::None; + return std::nullopt; } llvm::StringRef CommandObjectProxy::GetUnsupportedError() { |