Skip to content

Commit 535c6dd

Browse files
committed
Small cleanup
1 parent 6421427 commit 535c6dd

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/driver/aot.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -280,25 +280,20 @@ fn module_codegen(
280280
cgu.is_primary(),
281281
);
282282

283-
let global_asm_object_file = match crate::global_asm::compile_global_asm(
283+
let global_asm_object_file = crate::global_asm::compile_global_asm(
284284
&global_asm_config,
285285
cgu.name().as_str(),
286286
&cx.global_asm,
287-
) {
288-
Ok(global_asm_object_file) => global_asm_object_file,
289-
Err(err) => tcx.sess.fatal(&err),
290-
};
287+
)?;
291288

292-
let debug_context = cx.debug_context;
293-
let unwind_context = cx.unwind_context;
294289
tcx.sess.time("write object file", || {
295290
emit_cgu(
296291
&global_asm_config.output_filenames,
297-
&tcx.sess.prof,
292+
&cx.profiler,
298293
cgu.name().as_str().to_string(),
299294
module,
300-
debug_context,
301-
unwind_context,
295+
cx.debug_context,
296+
cx.unwind_context,
302297
global_asm_object_file,
303298
)
304299
})

0 commit comments

Comments
 (0)