Skip to content

Commit 0edcf1e

Browse files
committed
Inline build_block
1 parent e142cdf commit 0edcf1e

File tree

1 file changed

+4
-7
lines changed
  • compiler/rustc_codegen_ssa/src/mir

1 file changed

+4
-7
lines changed

compiler/rustc_codegen_ssa/src/mir/block.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
170170
}
171171

172172
if let Some((ret_dest, target)) = destination {
173-
let mut ret_bx = fx.build_block(target);
173+
let target_llbb = fx.llbb(target);
174+
let mut ret_bx = Bx::build(fx.cx, target_llbb);
174175
fx.set_debug_loc(&mut ret_bx, self.terminator.source_info);
175176
fx.store_return(&mut ret_bx, ret_dest, &fn_abi.ret, invokeret);
176177
}
@@ -1023,7 +1024,8 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
10231024

10241025
impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
10251026
pub fn codegen_block(&mut self, bb: mir::BasicBlock) {
1026-
let mut bx = self.build_block(bb);
1027+
let llbb = self.llbb(bb);
1028+
let mut bx = Bx::build(self.cx, llbb);
10271029
let mir = self.mir;
10281030
let data = &mir[bb];
10291031

@@ -1465,11 +1467,6 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
14651467
})
14661468
}
14671469

1468-
pub fn build_block(&mut self, bb: mir::BasicBlock) -> Bx {
1469-
let llbb = self.llbb(bb);
1470-
Bx::build(self.cx, llbb)
1471-
}
1472-
14731470
fn make_return_dest(
14741471
&mut self,
14751472
bx: &mut Bx,

0 commit comments

Comments
 (0)