File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -120,11 +120,11 @@ impl ExtraBackendMethods for LlvmCodegenBackend {
120120 fn write_metadata < ' b , ' gcx > (
121121 & self ,
122122 tcx : TyCtxt < ' b , ' gcx , ' gcx > ,
123- metadata : & ModuleLlvm
123+ metadata : & mut ModuleLlvm
124124 ) -> EncodedMetadata {
125125 base:: write_metadata ( tcx, metadata)
126126 }
127- fn codegen_allocator ( & self , tcx : TyCtxt , mods : & ModuleLlvm , kind : AllocatorKind ) {
127+ fn codegen_allocator ( & self , tcx : TyCtxt , mods : & mut ModuleLlvm , kind : AllocatorKind ) {
128128 unsafe { allocator:: codegen ( tcx, mods, kind) }
129129 }
130130 fn compile_codegen_unit < ' a , ' tcx : ' a > (
Original file line number Diff line number Diff line change @@ -551,9 +551,9 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
551551 & [ "crate" ] ,
552552 Some ( "metadata" ) ) . as_str ( )
553553 . to_string ( ) ;
554- let metadata_llvm_module = backend. new_metadata ( tcx, & metadata_cgu_name) ;
554+ let mut metadata_llvm_module = backend. new_metadata ( tcx, & metadata_cgu_name) ;
555555 let metadata = time ( tcx. sess , "write metadata" , || {
556- backend. write_metadata ( tcx, & metadata_llvm_module)
556+ backend. write_metadata ( tcx, & mut metadata_llvm_module)
557557 } ) ;
558558 tcx. sess . profiler ( |p| p. end_activity ( ProfileCategory :: Codegen ) ) ;
559559
@@ -636,9 +636,9 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
636636 & [ "crate" ] ,
637637 Some ( "allocator" ) ) . as_str ( )
638638 . to_string ( ) ;
639- let modules = backend. new_metadata ( tcx, & llmod_id) ;
639+ let mut modules = backend. new_metadata ( tcx, & llmod_id) ;
640640 time ( tcx. sess , "write allocator module" , || {
641- backend. codegen_allocator ( tcx, & modules, kind)
641+ backend. codegen_allocator ( tcx, & mut modules, kind)
642642 } ) ;
643643
644644 Some ( ModuleCodegen {
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se
3636 fn write_metadata < ' b , ' gcx > (
3737 & self ,
3838 tcx : TyCtxt < ' b , ' gcx , ' gcx > ,
39- metadata : & Self :: Module ,
39+ metadata : & mut Self :: Module ,
4040 ) -> EncodedMetadata ;
41- fn codegen_allocator ( & self , tcx : TyCtxt , mods : & Self :: Module , kind : AllocatorKind ) ;
41+ fn codegen_allocator ( & self , tcx : TyCtxt , mods : & mut Self :: Module , kind : AllocatorKind ) ;
4242 fn compile_codegen_unit < ' a , ' tcx : ' a > (
4343 & self ,
4444 tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
You can’t perform that action at this time.
0 commit comments