aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectQuit.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2023-12-09 13:28:42 +0000
committerDimitry Andric <dim@FreeBSD.org>2023-12-09 13:28:42 +0000
commitb1c73532ee8997fe5dfbeb7d223027bdf99758a0 (patch)
tree7d6e51c294ab6719475d660217aa0c0ad0526292 /lldb/source/Commands/CommandObjectQuit.cpp
parent7fa27ce4a07f19b07799a767fc29416f3b625afb (diff)
Diffstat (limited to 'lldb/source/Commands/CommandObjectQuit.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectQuit.cpp12
1 files changed, 5 insertions, 7 deletions
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;
}