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 {
120
120
fn write_metadata < ' b , ' gcx > (
121
121
& self ,
122
122
tcx : TyCtxt < ' b , ' gcx , ' gcx > ,
123
- metadata : & ModuleLlvm
123
+ metadata : & mut ModuleLlvm
124
124
) -> EncodedMetadata {
125
125
base:: write_metadata ( tcx, metadata)
126
126
}
127
- fn codegen_allocator ( & self , tcx : TyCtxt , mods : & ModuleLlvm , kind : AllocatorKind ) {
127
+ fn codegen_allocator ( & self , tcx : TyCtxt , mods : & mut ModuleLlvm , kind : AllocatorKind ) {
128
128
unsafe { allocator:: codegen ( tcx, mods, kind) }
129
129
}
130
130
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>(
551
551
& [ "crate" ] ,
552
552
Some ( "metadata" ) ) . as_str ( )
553
553
. 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) ;
555
555
let metadata = time ( tcx. sess , "write metadata" , || {
556
- backend. write_metadata ( tcx, & metadata_llvm_module)
556
+ backend. write_metadata ( tcx, & mut metadata_llvm_module)
557
557
} ) ;
558
558
tcx. sess . profiler ( |p| p. end_activity ( ProfileCategory :: Codegen ) ) ;
559
559
@@ -636,9 +636,9 @@ pub fn codegen_crate<B: ExtraBackendMethods>(
636
636
& [ "crate" ] ,
637
637
Some ( "allocator" ) ) . as_str ( )
638
638
. to_string ( ) ;
639
- let modules = backend. new_metadata ( tcx, & llmod_id) ;
639
+ let mut modules = backend. new_metadata ( tcx, & llmod_id) ;
640
640
time ( tcx. sess , "write allocator module" , || {
641
- backend. codegen_allocator ( tcx, & modules, kind)
641
+ backend. codegen_allocator ( tcx, & mut modules, kind)
642
642
} ) ;
643
643
644
644
Some ( ModuleCodegen {
Original file line number Diff line number Diff line change @@ -36,9 +36,9 @@ pub trait ExtraBackendMethods: CodegenBackend + WriteBackendMethods + Sized + Se
36
36
fn write_metadata < ' b , ' gcx > (
37
37
& self ,
38
38
tcx : TyCtxt < ' b , ' gcx , ' gcx > ,
39
- metadata : & Self :: Module ,
39
+ metadata : & mut Self :: Module ,
40
40
) -> 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 ) ;
42
42
fn compile_codegen_unit < ' a , ' tcx : ' a > (
43
43
& self ,
44
44
tcx : TyCtxt < ' a , ' tcx , ' tcx > ,
You can’t perform that action at this time.
0 commit comments