1
Fork 0

Factor out a repeated config.no_integrated_as test.

This commit is contained in:
Nicholas Nethercote 2020-03-21 09:25:20 +11:00
parent a147cd070e
commit ca0f997519

View file

@ -749,7 +749,8 @@ pub(crate) unsafe fn codegen(
})?;
}
if config_emit_normal_obj && !config.no_integrated_as {
if config_emit_normal_obj {
if !config.no_integrated_as {
let _timer = cgcx
.prof
.generic_activity_with_arg("LLVM_module_codegen_emit_obj", &module.name[..]);
@ -763,7 +764,7 @@ pub(crate) unsafe fn codegen(
llvm::FileType::ObjectFile,
)
})?;
} else if config_emit_normal_obj && config.no_integrated_as {
} else {
let _timer = cgcx
.prof
.generic_activity_with_arg("LLVM_module_codegen_asm_to_obj", &module.name[..]);
@ -774,6 +775,7 @@ pub(crate) unsafe fn codegen(
drop(fs::remove_file(&assembly));
}
}
}
if config.obj_is_bitcode {
if config.emit_obj {