Improve error handling, and start refactoring Instance.
Introduce proper error handling in several places, and perform a first pass at refactoring Instance to make it easier to use.
This commit is contained in:
@@ -146,7 +146,12 @@ fn handle_module(path: PathBuf, target: &Option<String>, output: &str) -> Result
|
||||
.map_err(|err| format!("{}", err))?;
|
||||
}
|
||||
|
||||
let (compilation, relocations) = compile_module(&translation, &*isa)?;
|
||||
let (compilation, relocations) = compile_module(
|
||||
&translation.module,
|
||||
&translation.lazy.function_body_inputs,
|
||||
&*isa,
|
||||
)
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
emit_module(&mut obj, &translation.module, &compilation, &relocations)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user