================
@@ -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);
 }
----------------
JDevlieghere wrote:

Possibly simpler:

```
if (CommandObject *proxy_command = GetProxyCommandObject()) 
  proxy_command->Execute(args_string, result); 
else 
  result.AppendError(GetUnsupportedError());
```

https://github.com/llvm/llvm-project/pull/69989
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to