diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-07-03 14:10:23 +0000 |
| commit | 145449b1e420787bb99721a429341fa6be3adfb6 (patch) | |
| tree | 1d56ae694a6de602e348dd80165cf881a36600ed /lldb/source/Commands/CommandObjectMultiword.cpp | |
| parent | ecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff) | |
Diffstat (limited to 'lldb/source/Commands/CommandObjectMultiword.cpp')
| -rw-r--r-- | lldb/source/Commands/CommandObjectMultiword.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
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<std::string> +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<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 nullptr; + return llvm::None; } llvm::StringRef CommandObjectProxy::GetUnsupportedError() { |
