From 535c6ddc8bf66d8997c9a89ce457974e2c2c11ec Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Thu, 18 Aug 2022 18:59:14 +0000 Subject: [PATCH] Small cleanup --- src/driver/aot.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/driver/aot.rs b/src/driver/aot.rs index 971e5eeea873..3220d16f7253 100644 --- a/src/driver/aot.rs +++ b/src/driver/aot.rs @@ -280,25 +280,20 @@ fn module_codegen( cgu.is_primary(), ); - let global_asm_object_file = match crate::global_asm::compile_global_asm( + let global_asm_object_file = crate::global_asm::compile_global_asm( &global_asm_config, cgu.name().as_str(), &cx.global_asm, - ) { - Ok(global_asm_object_file) => global_asm_object_file, - Err(err) => tcx.sess.fatal(&err), - }; + )?; - let debug_context = cx.debug_context; - let unwind_context = cx.unwind_context; tcx.sess.time("write object file", || { emit_cgu( &global_asm_config.output_filenames, - &tcx.sess.prof, + &cx.profiler, cgu.name().as_str().to_string(), module, - debug_context, - unwind_context, + cx.debug_context, + cx.unwind_context, global_asm_object_file, ) })