Skip to content

Commit 5fc1366

Browse files
committed
Register debuginfo for lazy jit shim
1 parent df1b251 commit 5fc1366

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/driver/jit.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ pub(crate) fn run_jit(tcx: TyCtxt<'_>, backend_config: BackendConfig) -> ! {
140140
});
141141
}
142142
CodegenMode::JitLazy => {
143-
codegen_shim(tcx, &mut cached_context, &mut jit_module, inst)
143+
codegen_shim(tcx, &mut cx, &mut cached_context, &mut jit_module, inst)
144144
}
145145
},
146146
MonoItem::Static(def_id) => {
@@ -353,6 +353,7 @@ fn load_imported_symbols_for_jit(
353353

354354
fn codegen_shim<'tcx>(
355355
tcx: TyCtxt<'tcx>,
356+
cx: &mut CodegenCx<'tcx>,
356357
cached_context: &mut Context,
357358
module: &mut JITModule,
358359
inst: Instance<'tcx>,
@@ -403,4 +404,5 @@ fn codegen_shim<'tcx>(
403404
trampoline_builder.ins().return_(&ret_vals);
404405

405406
module.define_function(func_id, context).unwrap();
407+
cx.unwind_context.add_function(func_id, context, module.isa());
406408
}

0 commit comments

Comments
 (0)