[lldb] Assert that CommandResultObject error messages are not empty
authorDavid Spickett <david.spickett@linaro.org>
Fri, 18 Jun 2021 12:17:53 +0000 (12:17 +0000)
committerDavid Spickett <david.spickett@linaro.org>
Mon, 21 Jun 2021 09:44:47 +0000 (09:44 +0000)
commit12ae3cb7ba5399b99c02e8a73c681192259e188f
tree6c268387bbeeeb981782f54143ff9f0c4fee13c4
parentbbd7424402c74b6a84c047657554ff7967da0e85
[lldb] Assert that CommandResultObject error messages are not empty

The intention is now that AppendError/SetError/AppendRawError only
be called with some message to show. This enforces that.

For SetError with a Status and a fallback string first assert
that the Status is a failure Status. Then it calls SetError(StringRef)
which checks the message is valid. (which could be the fallback
or the Status')

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D104525
lldb/source/Interpreter/CommandReturnObject.cpp