diff options
| -rw-r--r-- | src/librustc_trans/base.rs | 8 | ||||
| -rw-r--r-- | src/librustc_trans/callee.rs | 4 | ||||
| -rw-r--r-- | src/librustc_trans/glue.rs | 2 | ||||
| -rw-r--r-- | src/librustc_trans/meth.rs | 2 |
4 files changed, 5 insertions, 11 deletions
diff --git a/src/librustc_trans/base.rs b/src/librustc_trans/base.rs index d7efd2ce0a8..1e37f743b6f 100644 --- a/src/librustc_trans/base.rs +++ b/src/librustc_trans/base.rs @@ -565,12 +565,6 @@ pub fn alloc_ty<'a, 'tcx>(bcx: &BlockAndBuilder<'a, 'tcx>, ty: Ty<'tcx>, name: & } impl<'a, 'tcx> FunctionContext<'a, 'tcx> { - /// Ties up the llstaticallocas -> llloadenv -> lltop edges, - /// and builds the return block. - pub fn finish(&'a self, ret_cx: &BlockAndBuilder<'a, 'tcx>) { - self.build_return_block(ret_cx); - } - // Builds the return block for a function. pub fn build_return_block(&self, ret_cx: &BlockAndBuilder<'a, 'tcx>) { if self.llretslotptr.is_none() || self.fn_ty.ret.is_indirect() { @@ -711,7 +705,7 @@ pub fn trans_ctor_shim<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, adt::trans_set_discr(&bcx, sig.output(), dest, disr); } - fcx.finish(&bcx); + fcx.build_return_block(&bcx); } pub fn llvm_linkage_by_name(name: &str) -> Option<Linkage> { diff --git a/src/librustc_trans/callee.rs b/src/librustc_trans/callee.rs index 23351e01df8..fa24c5ecf2e 100644 --- a/src/librustc_trans/callee.rs +++ b/src/librustc_trans/callee.rs @@ -419,7 +419,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>( bcx.unreachable(); } self_scope.trans(&bcx); - fcx.finish(&bcx); + fcx.build_return_block(&bcx); ccx.instances().borrow_mut().insert(method_instance, lloncefn); @@ -540,7 +540,7 @@ fn trans_fn_pointer_shim<'a, 'tcx>( ty: bare_fn_ty }; callee.call(&bcx, &llargs[(self_idx + 1)..], fcx.llretslotptr, None); - fcx.finish(&bcx); + fcx.build_return_block(&bcx); ccx.fn_pointer_shims().borrow_mut().insert(bare_fn_ty_maybe_ref, llfn); diff --git a/src/librustc_trans/glue.rs b/src/librustc_trans/glue.rs index 26445efe06c..936ab090112 100644 --- a/src/librustc_trans/glue.rs +++ b/src/librustc_trans/glue.rs @@ -201,7 +201,7 @@ pub fn implement_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, g: DropGlueKi // type, so we don't need to explicitly cast the function parameter. let bcx = make_drop_glue(bcx, get_param(llfn, 0), g); - fcx.finish(&bcx); + fcx.build_return_block(&bcx); } fn trans_custom_dtor<'a, 'tcx>(mut bcx: BlockAndBuilder<'a, 'tcx>, diff --git a/src/librustc_trans/meth.rs b/src/librustc_trans/meth.rs index b8901231f1c..a09838f282b 100644 --- a/src/librustc_trans/meth.rs +++ b/src/librustc_trans/meth.rs @@ -86,7 +86,7 @@ pub fn trans_object_shim<'a, 'tcx>(ccx: &'a CrateContext<'a, 'tcx>, let llargs = get_params(fcx.llfn); callee.call(&bcx, &llargs[fcx.fn_ty.ret.is_indirect() as usize..], fcx.llretslotptr, None); - fcx.finish(&bcx); + fcx.build_return_block(&bcx); llfn } |
