Don't return CodeInfo from Context::compile_and_emit

It is already available through ctx.mach_compile_result and rarely
needed.
This commit is contained in:
bjorn3
2022-01-04 15:48:05 +01:00
parent dd85d66ec3
commit b3aa692a44
5 changed files with 20 additions and 23 deletions

View File

@@ -266,9 +266,10 @@ fn handle_module(options: &Options, path: &Path, name: &str, fisa: FlagsOrIsa) -
anyhow::bail!("{}", pretty_verifier_error(&context.func, None, errors));
}
} else {
let code_info = context
context
.compile_and_emit(isa, &mut mem, &mut relocs, &mut traps, &mut stack_maps)
.map_err(|err| anyhow::anyhow!("{}", pretty_error(&context.func, err)))?;
let code_info = context.mach_compile_result.as_ref().unwrap().code_info();
if options.print_size {
println!(