Return a named error in the result object of an expression with no result

Before we returned an error that was not exposed in the SB API and no useful
error message.  This change returns eExpressionProducedNoResult and an
appropriate error string.

<rdar://problem/44539514>

Differential Revision: https://reviews.llvm.org/D53309

llvm-svn: 344647
This commit is contained in:
Jim Ingham
2018-10-16 21:58:40 +00:00
parent d33f6e73e1
commit b1ecc3cac2
10 changed files with 73 additions and 11 deletions

View File

@@ -1758,7 +1758,7 @@ bool RenderScriptRuntime::EvalRSExpression(const char *expr,
if (!expr_result->GetError().Success()) {
Status err = expr_result->GetError();
// Expression returned is void, so this is actually a success
if (err.GetError() == UserExpression::kNoResult) {
if (err.GetError() == lldb::eExpressionProducedNoResult) {
if (log)
log->Printf("%s - expression returned void.", __FUNCTION__);