Log function definition unconditionally
Don't log inside the `.map_err` call, which resulted in only logging function definitions on codegen errors.
This commit is contained in:
committed by
Benjamin Bouvier
parent
689771caf3
commit
fcf0ad1d5d
@@ -547,14 +547,14 @@ where
|
||||
func: FuncId,
|
||||
ctx: &mut Context,
|
||||
) -> ModuleResult<binemit::CodeOffset> {
|
||||
let CodeInfo { total_size, .. } = ctx.compile(self.backend.isa()).map_err(|e| {
|
||||
info!(
|
||||
"defining function {}: {}",
|
||||
func,
|
||||
ctx.func.display(self.backend.isa())
|
||||
);
|
||||
ModuleError::Compilation(e)
|
||||
})?;
|
||||
info!(
|
||||
"defining function {}: {}",
|
||||
func,
|
||||
ctx.func.display(self.backend.isa())
|
||||
);
|
||||
let CodeInfo { total_size, .. } = ctx
|
||||
.compile(self.backend.isa())
|
||||
.map_err(ModuleError::Compilation)?;
|
||||
let info = &self.contents.functions[func];
|
||||
if info.compiled.is_some() {
|
||||
return Err(ModuleError::DuplicateDefinition(info.decl.name.clone()));
|
||||
|
||||
Reference in New Issue
Block a user