type_system_helper->DeclMap(); // result can be NULL
if (decl_map) {
- Target *target = exe_ctx.GetTargetPtr();
- auto &error_stream = target->GetDebugger().GetErrorStream();
+ StreamString error_stream;
IRForTarget ir_for_target(decl_map, m_expr.NeedsVariableResolution(),
*execution_unit_sp, error_stream,
function_name.AsCString());
- 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");
+ if (!ir_for_target.runOnModule(*execution_unit_sp->GetModule())) {
+ err.SetErrorString(error_stream.GetString());
return err;
}
# be prepared to run in the target but it should at least not crash LLDB.
self.expect('expr --lang objc -- [NSString stringWithFormat:@"%d", 1];',
error=True,
- substrs=["error: The expression could not be prepared to run in the target"])
+ substrs=["Rewriting an Objective-C constant string requires CFStringCreateWithBytes"])