From 145449b1e420787bb99721a429341fa6be3adfb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 3 Jul 2022 16:10:23 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-15358-g53dc0f107877. --- lldb/source/Commands/CommandObjectMultiword.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp') diff --git a/lldb/source/Commands/CommandObjectMultiword.cpp b/lldb/source/Commands/CommandObjectMultiword.cpp index 0629342748aa..e4fdb7365e72 100644 --- a/lldb/source/Commands/CommandObjectMultiword.cpp +++ b/lldb/source/Commands/CommandObjectMultiword.cpp @@ -290,15 +290,16 @@ void CommandObjectMultiword::HandleCompletion(CompletionRequest &request) { sub_command_object->HandleCompletion(request); } -const char *CommandObjectMultiword::GetRepeatCommand(Args ¤t_command_args, - uint32_t index) { +llvm::Optional +CommandObjectMultiword::GetRepeatCommand(Args ¤t_command_args, + uint32_t index) { index++; if (current_command_args.GetArgumentCount() <= index) - return nullptr; + return llvm::None; CommandObject *sub_command_object = GetSubcommandObject(current_command_args[index].ref()); if (sub_command_object == nullptr) - return nullptr; + return llvm::None; return sub_command_object->GetRepeatCommand(current_command_args, index); } @@ -419,12 +420,13 @@ void CommandObjectProxy::HandleArgumentCompletion( proxy_command->HandleArgumentCompletion(request, opt_element_vector); } -const char *CommandObjectProxy::GetRepeatCommand(Args ¤t_command_args, - uint32_t index) { +llvm::Optional +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 nullptr; + return llvm::None; } llvm::StringRef CommandObjectProxy::GetUnsupportedError() { -- cgit v1.3