diff options
Diffstat (limited to 'lldb/source/Expression')
| -rw-r--r-- | lldb/source/Expression/ExpressionSourceCode.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/REPL.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/Expression/UserExpression.cpp | 9 |
3 files changed, 4 insertions, 9 deletions
diff --git a/lldb/source/Expression/ExpressionSourceCode.cpp b/lldb/source/Expression/ExpressionSourceCode.cpp index 2c8f77bb2df..abbb332fac4 100644 --- a/lldb/source/Expression/ExpressionSourceCode.cpp +++ b/lldb/source/Expression/ExpressionSourceCode.cpp @@ -256,7 +256,7 @@ bool ExpressionSourceCode::GetText(std::string &text, } ConstString object_name; - if (1 /* Language::LanguageIsCPlusPlus(frame->GetLanguage())*/) { + if (Language::LanguageIsCPlusPlus(frame->GetLanguage())) { if (target->GetInjectLocalVariables(&exe_ctx)) { lldb::VariableListSP var_list_sp = frame->GetInScopeVariableList(false, true); diff --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp index c29004c8252..50d4a09b636 100644 --- a/lldb/source/Expression/REPL.cpp +++ b/lldb/source/Expression/REPL.cpp @@ -325,7 +325,7 @@ void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) { if (result_valobj_sp->GetError().Success()) { handled |= PrintOneVariable(debugger, output_sp, result_valobj_sp); } else if (result_valobj_sp->GetError().GetError() == - lldb::eExpressionProducedNoResult) { + UserExpression::kNoResult) { if (format != lldb::eFormatVoid && debugger.GetNotifyVoid()) { error_sp->PutCString("(void)\n"); handled = true; diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index 1477bbdb660..34945fdcbfa 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -151,9 +151,6 @@ lldb::ExpressionResults UserExpression::Evaluate( ? UserExpression::eResultTypeId : UserExpression::eResultTypeAny; lldb::ExpressionResults execution_results = lldb::eExpressionSetupError; - - static const char *no_result_error = "Expression completed successfully " - "but had no result"; Target *target = exe_ctx.GetTargetPtr(); if (!target) { @@ -307,8 +304,7 @@ lldb::ExpressionResults UserExpression::Evaluate( error.SetExpressionError(lldb::eExpressionSetupError, "expression needed to run but couldn't"); } else if (execution_policy == eExecutionPolicyTopLevel) { - error.SetExpressionError(lldb::eExpressionProducedNoResult, - no_result_error); + error.SetError(UserExpression::kNoResult, lldb::eErrorTypeGeneric); return lldb::eExpressionCompleted; } else { if (options.InvokeCancelCallback(lldb::eExpressionEvaluationExecution)) { @@ -353,8 +349,7 @@ lldb::ExpressionResults UserExpression::Evaluate( log->Printf("== [UserExpression::Evaluate] Execution completed " "normally with no result =="); - error.SetExpressionError(lldb::eExpressionProducedNoResult, - no_result_error); + error.SetError(UserExpression::kNoResult, lldb::eErrorTypeGeneric); } } } |

