bool ir_can_run = ir_for_target.runOnModule(*execution_unit_sp->GetModule());
+ if (!ir_can_run)
+ {
+ err.SetErrorString("The expression could not be prepared to run in the target");
+ return err;
+ }
+
Process *process = exe_ctx.GetProcessPtr();
- if (execution_policy != eExecutionPolicyAlways && execution_policy != eExecutionPolicyTopLevel && ir_can_run)
+ if (execution_policy != eExecutionPolicyAlways && execution_policy != eExecutionPolicyTopLevel)
{
lldb_private::Error interpret_error;
}
}
- if (!ir_can_run)
- {
- err.SetErrorString("The expression could not be prepared to run in the target");
- return err;
- }
-
if (!process && execution_policy == eExecutionPolicyAlways)
{
err.SetErrorString("Expression needed to run in the target, but the target can't be run");