about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-08-18 18:59:14 +0000
committerbjorn3 <17426603+bjorn3@users.noreply.github.com>2022-08-18 19:03:28 +0000
commit535c6ddc8bf66d8997c9a89ce457974e2c2c11ec (patch)
tree9049b29b161aad6ee91cf94ab211b6a1adf25d34
parent6421427b74f87ae463a623edd684c34b50790bb2 (diff)
downloadrust-535c6ddc8bf66d8997c9a89ce457974e2c2c11ec.tar.gz
rust-535c6ddc8bf66d8997c9a89ce457974e2c2c11ec.zip
Small cleanup
-rw-r--r--src/driver/aot.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/driver/aot.rs b/src/driver/aot.rs
index 971e5eeea87..3220d16f725 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,
         )
     })