From b1c73532ee8997fe5dfbeb7d223027bdf99758a0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 9 Dec 2023 14:28:42 +0100 Subject: Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1. --- lldb/source/Commands/CommandObjectQuit.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'lldb/source/Commands/CommandObjectQuit.cpp') diff --git a/lldb/source/Commands/CommandObjectQuit.cpp b/lldb/source/Commands/CommandObjectQuit.cpp index 650cfca2c050..d7caf1546fb5 100644 --- a/lldb/source/Commands/CommandObjectQuit.cpp +++ b/lldb/source/Commands/CommandObjectQuit.cpp @@ -62,7 +62,7 @@ bool CommandObjectQuit::ShouldAskForConfirmation(bool &is_a_detach) { return should_prompt; } -bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) { +void CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) { bool is_a_detach = true; if (ShouldAskForConfirmation(is_a_detach)) { StreamString message; @@ -71,14 +71,14 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) { (is_a_detach ? "detach from" : "kill")); if (!m_interpreter.Confirm(message.GetString(), true)) { result.SetStatus(eReturnStatusFailed); - return false; + return; } } if (command.GetArgumentCount() > 1) { result.AppendError("Too many arguments for 'quit'. Only an optional exit " "code is allowed"); - return false; + return; } // We parse the exit code argument if there is one. @@ -90,12 +90,12 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) { std::string arg_str = arg.str(); s.Printf("Couldn't parse '%s' as integer for exit code.", arg_str.data()); result.AppendError(s.GetString()); - return false; + return; } if (!m_interpreter.SetQuitExitCode(exit_code)) { result.AppendError("The current driver doesn't allow custom exit codes" " for the quit command."); - return false; + return; } } @@ -103,6 +103,4 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) { CommandInterpreter::eBroadcastBitQuitCommandReceived; m_interpreter.BroadcastEvent(event_type); result.SetStatus(eReturnStatusQuit); - - return true; } -- cgit v1.3