diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-18 15:38:27 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-02-20 13:39:44 +0100 |
| commit | 0edcf1e2496caed074187c3c5ffac14537e633cf (patch) | |
| tree | 7a0cca9507419267c752451e3fcfa26868ea0b18 /compiler/rustc_codegen_ssa/src | |
| parent | e142cdf4f6c3d18cb8f2f9ecfa386873a1910050 (diff) | |
| download | rust-0edcf1e2496caed074187c3c5ffac14537e633cf.tar.gz rust-0edcf1e2496caed074187c3c5ffac14537e633cf.zip | |
Inline build_block
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index f3d41f3f86c..ca46d230b72 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -170,7 +170,8 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> { } if let Some((ret_dest, target)) = destination { - let mut ret_bx = fx.build_block(target); + let target_llbb = fx.llbb(target); + let mut ret_bx = Bx::build(fx.cx, target_llbb); fx.set_debug_loc(&mut ret_bx, self.terminator.source_info); fx.store_return(&mut ret_bx, ret_dest, &fn_abi.ret, invokeret); } @@ -1023,7 +1024,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { pub fn codegen_block(&mut self, bb: mir::BasicBlock) { - let mut bx = self.build_block(bb); + let llbb = self.llbb(bb); + let mut bx = Bx::build(self.cx, llbb); let mir = self.mir; let data = &mir[bb]; @@ -1465,11 +1467,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { }) } - pub fn build_block(&mut self, bb: mir::BasicBlock) -> Bx { - let llbb = self.llbb(bb); - Bx::build(self.cx, llbb) - } - fn make_return_dest( &mut self, bx: &mut Bx, |
