rustc_codegen_ssa: append blocks to functions w/o creating a builder.
This commit is contained in:
parent
402e9efc56
commit
0fcaf11455
7 changed files with 54 additions and 38 deletions
|
@ -678,7 +678,8 @@ fn gen_fn<'ll, 'tcx>(
|
|||
cx.apply_target_cpu_attr(llfn);
|
||||
// FIXME(eddyb) find a nicer way to do this.
|
||||
unsafe { llvm::LLVMRustSetLinkage(llfn, llvm::Linkage::InternalLinkage) };
|
||||
let bx = Builder::new_block(cx, llfn, "entry-block");
|
||||
let llbb = Builder::append_block(cx, llfn, "entry-block");
|
||||
let bx = Builder::build(cx, llbb);
|
||||
codegen(bx);
|
||||
llfn
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue