forked from OSchip/llvm-project
Don't try to actually run code when the expression is top-level.
llvm-svn: 264660
This commit is contained in:
parent
38167d2536
commit
2ff00003f1
|
@ -281,6 +281,11 @@ UserExpression::Evaluate (ExecutionContext &exe_ctx,
|
|||
if (!diagnostic_manager.Diagnostics().size())
|
||||
error.SetExpressionError(lldb::eExpressionSetupError, "expression needed to run but couldn't");
|
||||
}
|
||||
else if (execution_policy == eExecutionPolicyTopLevel)
|
||||
{
|
||||
error.SetError(UserExpression::kNoResult, lldb::eErrorTypeGeneric);
|
||||
return lldb::eExpressionCompleted;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (options.InvokeCancelCallback (lldb::eExpressionEvaluationExecution))
|
||||
|
|
Loading…
Reference in New Issue