[Lldb-commits] [PATCH] D47992: [lldb-mi] Correct error processing in exec-next command.

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jun 11 08:21:00 PDT 2018


clayborg added inline comments.


================
Comment at: tools/lldb-mi/MICmdCmdExec.cpp:373-377
+  if (error.Success())
+    return MIstatus::success;
+
+  SetError(error.GetCString());
+  return MIstatus::failure;
----------------
Maybe these four lines should be put into a utility function? Something like:
```
MIstatus ReturnMIStatus(lldb::SBError &error) {
  if (error.Success())
    return MIstatus::success;

  SetError(error.GetCString());
  return MIstatus::failure;
}
```
I am sure just about every MI command will end with something like this.


https://reviews.llvm.org/D47992





More information about the lldb-commits mailing list