diff options
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/base.rs')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/base.rs | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs index c5ca7936a2b..3e9d29df02c 100644 --- a/compiler/rustc_codegen_ssa/src/base.rs +++ b/compiler/rustc_codegen_ssa/src/base.rs @@ -635,16 +635,9 @@ pub fn codegen_crate<B: ExtraBackendMethods>( if let Some(kind) = allocator_kind_for_codegen(tcx) { let llmod_id = cgu_name_builder.build_cgu_name(LOCAL_CRATE, &["crate"], Some("allocator")).to_string(); - let module_llvm = tcx.sess.time("write_allocator_module", || { - backend.codegen_allocator( - tcx, - &llmod_id, - kind, - // If allocator_kind is Some then alloc_error_handler_kind must - // also be Some. - tcx.alloc_error_handler_kind(()).unwrap(), - ) - }); + let module_llvm = tcx + .sess + .time("write_allocator_module", || backend.codegen_allocator(tcx, &llmod_id, kind)); ongoing_codegen.submit_pre_codegened_module_to_llvm( tcx, |
