[Lldb-commits] [lldb] [lldb] Part 1 of 2 - Refactor `CommandObject::Execute(...)` return `void` (not `bool`) (PR #69989)

Pete Lawrence via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 24 14:56:04 PDT 2023


================
@@ -429,11 +428,13 @@ llvm::StringRef CommandObjectProxy::GetUnsupportedError() {
   return "command is not implemented";
 }
 
-bool CommandObjectProxy::Execute(const char *args_string,
+void CommandObjectProxy::Execute(const char *args_string,
                                  CommandReturnObject &result) {
   CommandObject *proxy_command = GetProxyCommandObject();
-  if (proxy_command)
-    return proxy_command->Execute(args_string, result);
-  result.AppendError(GetUnsupportedError());
-  return false;
+  if (!proxy_command) {
+    result.AppendError(GetUnsupportedError());
+    return;
+  }
+
+  proxy_command->Execute(args_string, result);
 }
----------------
PortalPete wrote:

I put that in, thanks.

https://github.com/llvm/llvm-project/pull/69989


More information about the lldb-commits mailing list