[Lldb-commits] [PATCH] D104778: [lldb] Remove asserts in CommandReturnObject SetError and AppendError

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 23 04:49:07 PDT 2021


DavidSpickett added a comment.

> LGTM, I'll add them in my patch. Thanks for the quick turnaround!

To clarify, is there still a regression with the API?

- This removes the asserts so you won't crash
- No functions are changed in `lldb/include/lldb/API/SBCommandReturnObject.h`

The one thing that is different is that calling the API SetError with an empty string will now set eReturnStatusFailed. So:

  s = do_thing_and_return_err_string_if_err(...)
  return_object.SetError(s)

Would now set it to failed even if s is empty.

Perhaps the SetError(...) functions should retain the empty message == nop behaviour and AppendError can set the status unconditionally?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104778/new/

https://reviews.llvm.org/D104778



More information about the lldb-commits mailing list