@@ -86,9 +86,7 @@ use rustc_codegen_ssa::back::write::{
8686} ;
8787use rustc_codegen_ssa:: base:: codegen_crate;
8888use rustc_codegen_ssa:: target_features:: cfg_target_feature;
89- use rustc_codegen_ssa:: traits:: {
90- CodegenBackend , ExtraBackendMethods , ThinBufferMethods , WriteBackendMethods ,
91- } ;
89+ use rustc_codegen_ssa:: traits:: { CodegenBackend , ExtraBackendMethods , WriteBackendMethods } ;
9290use rustc_codegen_ssa:: { CodegenResults , CompiledModule , ModuleCodegen , TargetConfig } ;
9391use rustc_data_structures:: fx:: FxIndexMap ;
9492use rustc_data_structures:: profiling:: SelfProfilerRef ;
@@ -423,20 +421,11 @@ unsafe impl Send for SyncContext {}
423421// FIXME(antoyo): that shouldn't be Sync. Parallel compilation is currently disabled with "CodegenBackend::supports_parallel()".
424422unsafe impl Sync for SyncContext { }
425423
426- pub struct ThinBuffer ;
427-
428- impl ThinBufferMethods for ThinBuffer {
429- fn data ( & self ) -> & [ u8 ] {
430- & [ ]
431- }
432- }
433-
434424impl WriteBackendMethods for GccCodegenBackend {
435425 type Module = GccContext ;
436426 type TargetMachine = ( ) ;
437427 type ModuleBuffer = ModuleBuffer ;
438428 type ThinData = ( ) ;
439- type ThinBuffer = ThinBuffer ;
440429
441430 fn run_and_optimize_fat_lto (
442431 cgcx : & CodegenContext ,
@@ -458,7 +447,7 @@ impl WriteBackendMethods for GccCodegenBackend {
458447 // FIXME(bjorn3): Limit LTO exports to these symbols
459448 _exported_symbols_for_lto : & [ String ] ,
460449 _each_linked_rlib_for_lto : & [ PathBuf ] ,
461- _modules : Vec < ( String , Self :: ThinBuffer ) > ,
450+ _modules : Vec < ( String , Self :: ModuleBuffer ) > ,
462451 _cached_modules : Vec < ( SerializedModule < Self :: ModuleBuffer > , WorkProduct ) > ,
463452 ) -> ( Vec < ThinModule < Self > > , Vec < WorkProduct > ) {
464453 unreachable ! ( )
@@ -502,11 +491,7 @@ impl WriteBackendMethods for GccCodegenBackend {
502491 back:: write:: codegen ( cgcx, prof, shared_emitter, module, config)
503492 }
504493
505- fn prepare_thin ( _module : ModuleCodegen < Self :: Module > ) -> ( String , Self :: ThinBuffer ) {
506- unreachable ! ( )
507- }
508-
509- fn serialize_module ( _module : ModuleCodegen < Self :: Module > ) -> ( String , Self :: ModuleBuffer ) {
494+ fn serialize_module ( _module : Self :: Module , _is_thin : bool ) -> Self :: ModuleBuffer {
510495 unimplemented ! ( ) ;
511496 }
512497}
0 commit comments