Remove an unnecessary block scope.
This commit is contained in:
parent
47c8f3f56b
commit
e4b36baf54
1 changed files with 72 additions and 82 deletions
|
@ -686,7 +686,6 @@ pub(crate) unsafe fn codegen(
|
|||
embed_bitcode(cgcx, llcx, llmod, None);
|
||||
}
|
||||
|
||||
{
|
||||
if config.emit_ir {
|
||||
let _timer = cgcx
|
||||
.prof
|
||||
|
@ -700,9 +699,8 @@ pub(crate) unsafe fn codegen(
|
|||
output_ptr: *mut c_char,
|
||||
output_len: size_t,
|
||||
) -> size_t {
|
||||
let input = unsafe {
|
||||
slice::from_raw_parts(input_ptr as *const u8, input_len as usize)
|
||||
};
|
||||
let input =
|
||||
unsafe { slice::from_raw_parts(input_ptr as *const u8, input_len as usize) };
|
||||
|
||||
let input = match str::from_utf8(input) {
|
||||
Ok(s) => s,
|
||||
|
@ -745,14 +743,7 @@ pub(crate) unsafe fn codegen(
|
|||
// module to produce the asm output
|
||||
let llmod = if config.emit_obj { llvm::LLVMCloneModule(llmod) } else { llmod };
|
||||
with_codegen(tm, llmod, config.no_builtins, |cpm| {
|
||||
write_output_file(
|
||||
diag_handler,
|
||||
tm,
|
||||
cpm,
|
||||
llmod,
|
||||
&path,
|
||||
llvm::FileType::AssemblyFile,
|
||||
)
|
||||
write_output_file(diag_handler, tm, cpm, llmod, &path, llvm::FileType::AssemblyFile)
|
||||
})?;
|
||||
}
|
||||
|
||||
|
@ -781,7 +772,6 @@ pub(crate) unsafe fn codegen(
|
|||
drop(fs::remove_file(&assembly));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if config.emit_obj && config.obj_is_bitcode {
|
||||
debug!("copying bitcode {:?} to obj {:?}", bc_out, obj_out);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue