aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectRegister.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2021-06-17 12:32:23 +0100
committerDavid Spickett <david.spickett@linaro.org>2021-06-17 14:39:35 +0100
commiteaf60a4411f79a1addfa6c5d8ddf4b47e082881e (patch)
tree8ea76ea64b562f4386e0ce802a430a1292f5da89 /lldb/source/Commands/CommandObjectRegister.cpp
parent3f596842e3d25009c4d62c75e5b24b515bde8e93 (diff)
downloadllvm-eaf60a4411f79a1addfa6c5d8ddf4b47e082881e.zip
llvm-eaf60a4411f79a1addfa6c5d8ddf4b47e082881e.tar.gz
llvm-eaf60a4411f79a1addfa6c5d8ddf4b47e082881e.tar.bz2
[lldb] Remove redundant calls to set eReturnStatusFailed
This is part 2, covering the commands source. Some uses remain where it's tricky to see what the logic is or they are not used with AppendError. Reviewed By: teemperor Differential Revision: https://reviews.llvm.org/D104448
Diffstat (limited to 'lldb/source/Commands/CommandObjectRegister.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectRegister.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/lldb/source/Commands/CommandObjectRegister.cpp b/lldb/source/Commands/CommandObjectRegister.cpp
index 56e8c3f..6fd71c9 100644
--- a/lldb/source/Commands/CommandObjectRegister.cpp
+++ b/lldb/source/Commands/CommandObjectRegister.cpp
@@ -178,13 +178,11 @@ protected:
llvm::sys::StrError());
else
result.AppendError("unknown error while reading registers.\n");
- result.SetStatus(eReturnStatusFailed);
break;
}
} else {
result.AppendErrorWithFormat(
"invalid register set index: %" PRIu64 "\n", (uint64_t)set_idx);
- result.SetStatus(eReturnStatusFailed);
break;
}
}
@@ -203,11 +201,9 @@ protected:
if (m_command_options.dump_all_sets) {
result.AppendError("the --all option can't be used when registers "
"names are supplied as arguments\n");
- result.SetStatus(eReturnStatusFailed);
} else if (m_command_options.set_indexes.GetSize() > 0) {
result.AppendError("the --set <set> option can't be used when "
"registers names are supplied as arguments\n");
- result.SetStatus(eReturnStatusFailed);
} else {
for (auto &entry : command) {
// in most LLDB commands we accept $rbx as the name for register RBX
@@ -353,7 +349,6 @@ protected:
if (command.GetArgumentCount() != 2) {
result.AppendError(
"register write takes exactly 2 arguments: <reg-name> <value>");
- result.SetStatus(eReturnStatusFailed);
} else {
auto reg_name = command[0].ref();
auto value_str = command[1].ref();
@@ -390,11 +385,9 @@ protected:
"Failed to write register '%s' with value '%s'",
reg_name.str().c_str(), value_str.str().c_str());
}
- result.SetStatus(eReturnStatusFailed);
} else {
result.AppendErrorWithFormat("Register not found for '%s'.\n",
reg_name.str().c_str());
- result.SetStatus(eReturnStatusFailed);
}
}
return result.Succeeded();