aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMultiword.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:04 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-02-11 12:38:11 +0000
commite3b557809604d036af6e00c60f012c2025b59a5e (patch)
tree8a11ba2269a3b669601e2fd41145b174008f4da8 /lldb/source/Commands/CommandObjectMultiword.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMultiword.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp
index e4fdb7365e72..bae2717ffe68 100644
--- a/lldb/source/Commands/CommandObjectMultiword.cpp
+++ b/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 &current_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 &current_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() {