@@ -364,7 +364,8 @@ pub(crate) fn run_thin(
364
364
cached_modules : Vec < ( SerializedModule < ModuleBuffer > , WorkProduct ) > ,
365
365
) -> Result < ( Vec < LtoModuleCodegen < GccCodegenBackend > > , Vec < WorkProduct > ) , FatalError > {
366
366
let dcx = cgcx. create_dcx ( ) ;
367
- let lto_data = prepare_lto ( cgcx, & dcx) ?;
367
+ let dcx = dcx. handle ( ) ;
368
+ let lto_data = prepare_lto ( cgcx, dcx) ?;
368
369
/*let symbols_below_threshold =
369
370
symbols_below_threshold.iter().map(|c| c.as_ptr()).collect::<Vec<_>>();*/
370
371
if cgcx. opts . cg . linker_plugin_lto . enabled ( ) {
@@ -375,7 +376,7 @@ pub(crate) fn run_thin(
375
376
}
376
377
thin_lto (
377
378
cgcx,
378
- & dcx,
379
+ dcx,
379
380
modules,
380
381
lto_data. upstream_modules ,
381
382
lto_data. tmp_path ,
@@ -425,7 +426,7 @@ pub(crate) fn prepare_thin(
425
426
/// they all go out of scope.
426
427
fn thin_lto (
427
428
cgcx : & CodegenContext < GccCodegenBackend > ,
428
- _dcx : & DiagCtxt ,
429
+ _dcx : DiagCtxtHandle < ' _ > ,
429
430
modules : Vec < ( String , ThinBuffer ) > ,
430
431
serialized_modules : Vec < ( SerializedModule < ModuleBuffer > , CString ) > ,
431
432
tmp_path : TempDir ,
0 commit comments