@@ -364,7 +364,7 @@ fn generate_thin_lto_work<B: ExtraBackendMethods>(
364364 dcx : DiagCtxtHandle < ' _ > ,
365365 exported_symbols_for_lto : & [ String ] ,
366366 each_linked_rlib_for_lto : & [ PathBuf ] ,
367- needs_thin_lto : Vec < ( String , B :: ThinBuffer ) > ,
367+ needs_thin_lto : Vec < ( String , B :: ModuleBuffer ) > ,
368368 import_only_modules : Vec < ( SerializedModule < B :: ModuleBuffer > , WorkProduct ) > ,
369369) -> Vec < ( ThinLtoWorkItem < B > , u64 ) > {
370370 let _prof_timer = prof. generic_activity ( "codegen_thin_generate_lto_work" ) ;
@@ -418,7 +418,7 @@ enum MaybeLtoModules<B: WriteBackendMethods> {
418418 cgcx : CodegenContext ,
419419 exported_symbols_for_lto : Arc < Vec < String > > ,
420420 each_linked_rlib_file_for_lto : Vec < PathBuf > ,
421- needs_thin_lto : Vec < ( String , <B as WriteBackendMethods >:: ThinBuffer ) > ,
421+ needs_thin_lto : Vec < ( String , <B as WriteBackendMethods >:: ModuleBuffer ) > ,
422422 lto_import_only_modules :
423423 Vec < ( SerializedModule < <B as WriteBackendMethods >:: ModuleBuffer > , WorkProduct ) > ,
424424 } ,
@@ -796,7 +796,7 @@ pub(crate) enum WorkItemResult<B: WriteBackendMethods> {
796796
797797 /// The backend has finished compiling a CGU, which now needs to go through
798798 /// thin LTO.
799- NeedsThinLto ( String , B :: ThinBuffer ) ,
799+ NeedsThinLto ( String , B :: ModuleBuffer ) ,
800800}
801801
802802pub enum FatLtoInput < B : WriteBackendMethods > {
@@ -871,7 +871,7 @@ fn execute_optimize_work_item<B: ExtraBackendMethods>(
871871 WorkItemResult :: Finished ( module)
872872 }
873873 ComputedLtoType :: Thin => {
874- let thin_buffer = B :: prepare_thin ( module. module_llvm ) ;
874+ let thin_buffer = B :: serialize_module ( module. module_llvm , true ) ;
875875 if let Some ( path) = bitcode {
876876 fs:: write ( & path, thin_buffer. data ( ) ) . unwrap_or_else ( |e| {
877877 panic ! ( "Error writing pre-lto-bitcode file `{}`: {}" , path. display( ) , e) ;
@@ -881,7 +881,7 @@ fn execute_optimize_work_item<B: ExtraBackendMethods>(
881881 }
882882 ComputedLtoType :: Fat => match bitcode {
883883 Some ( path) => {
884- let buffer = B :: serialize_module ( module. module_llvm ) ;
884+ let buffer = B :: serialize_module ( module. module_llvm , false ) ;
885885 fs:: write ( & path, buffer. data ( ) ) . unwrap_or_else ( |e| {
886886 panic ! ( "Error writing pre-lto-bitcode file `{}`: {}" , path. display( ) , e) ;
887887 } ) ;
@@ -1023,7 +1023,7 @@ fn do_thin_lto<B: ExtraBackendMethods>(
10231023 tm_factory : TargetMachineFactoryFn < B > ,
10241024 exported_symbols_for_lto : Arc < Vec < String > > ,
10251025 each_linked_rlib_for_lto : Vec < PathBuf > ,
1026- needs_thin_lto : Vec < ( String , <B as WriteBackendMethods >:: ThinBuffer ) > ,
1026+ needs_thin_lto : Vec < ( String , <B as WriteBackendMethods >:: ModuleBuffer ) > ,
10271027 lto_import_only_modules : Vec < (
10281028 SerializedModule < <B as WriteBackendMethods >:: ModuleBuffer > ,
10291029 WorkProduct ,
@@ -1807,7 +1807,7 @@ fn start_executing_work<B: ExtraBackendMethods>(
18071807 ) ) ;
18081808 } else {
18091809 if let Some ( allocator_module) = allocator_module. take ( ) {
1810- let thin_buffer = B :: prepare_thin ( allocator_module. module_llvm ) ;
1810+ let thin_buffer = B :: serialize_module ( allocator_module. module_llvm , true ) ;
18111811 needs_thin_lto. push ( ( allocator_module. name , thin_buffer) ) ;
18121812 }
18131813
0 commit comments