]> git.lizzy.rs Git - rust.git/commitdiff
Inline and remove Builder::entry_block
authorMark Simulacrum <mark.simulacrum@gmail.com>
Mon, 2 Jan 2017 20:51:09 +0000 (13:51 -0700)
committerMark Simulacrum <mark.simulacrum@gmail.com>
Wed, 4 Jan 2017 18:38:10 +0000 (11:38 -0700)
src/librustc_trans/base.rs
src/librustc_trans/builder.rs
src/librustc_trans/callee.rs
src/librustc_trans/glue.rs
src/librustc_trans/intrinsic.rs
src/librustc_trans/meth.rs
src/librustc_trans/mir/mod.rs

index 8b182dabf51015af8d736c5a22ef9a6fd734540d..4cdde24ed48b568a1f69c6cd4690cc62f29ce010 100644 (file)
@@ -610,7 +610,7 @@ pub fn trans_ctor_shim<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
     let sig = ccx.tcx().erase_late_bound_regions_and_normalize(&ctor_ty.fn_sig());
     let fn_ty = FnType::new(ccx, Abi::Rust, &sig, &[]);
 
-    let bcx = Builder::entry_block(ccx, llfn);
+    let bcx = Builder::new_block(ccx, llfn, "entry-block");
     if !fn_ty.ret.is_ignore() {
         // But if there are no nested returns, we skip the indirection
         // and have a single retslot
index 33e6cc82ad78898bf9e73f524e1a9d950b62936e..cf7f3e9501d1a6e677a2576eac5e93681c4f84f4 100644 (file)
@@ -51,10 +51,6 @@ fn noname() -> *const c_char {
 }
 
 impl<'a, 'tcx> Builder<'a, 'tcx> {
-    pub fn entry_block(ccx: &'a CrateContext<'a, 'tcx>, llfn: ValueRef) -> Self {
-        Builder::new_block(ccx, llfn, "entry-block")
-    }
-
     pub fn new_block<'b>(ccx: &'a CrateContext<'a, 'tcx>, llfn: ValueRef, name: &'b str) -> Self {
         let builder = Builder::with_ccx(ccx);
         let llbb = unsafe {
index ae1086828b54226bc8cfd72e8d352bd9f5698a2f..257d6c01e4a653fda7d79997cfd243b7b32bb620 100644 (file)
@@ -329,7 +329,7 @@ fn trans_fn_once_adapter_shim<'a, 'tcx>(
     attributes::set_frame_pointer_elimination(ccx, lloncefn);
 
     let orig_fn_ty = fn_ty;
-    let mut bcx = Builder::entry_block(ccx, lloncefn);
+    let mut bcx = Builder::new_block(ccx, lloncefn, "entry-block");
 
     let callee = Callee {
         data: Fn(llreffn),
@@ -489,7 +489,7 @@ fn trans_fn_pointer_shim<'a, 'tcx>(
     let llfn = declare::define_internal_fn(ccx, &function_name, tuple_fn_ty);
     attributes::set_frame_pointer_elimination(ccx, llfn);
     //
-    let bcx = Builder::entry_block(ccx, llfn);
+    let bcx = Builder::new_block(ccx, llfn, "entry-block");
 
     let mut llargs = get_params(llfn);
 
index ab048ae6d9de27d2a5a338c37adc9085f4ee297c..98377dedb02a6586ddb7b5b7099c8cda20bdc63d 100644 (file)
@@ -173,7 +173,7 @@ pub fn implement_drop_glue<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>, g: DropGlueKi
     assert_eq!(g.ty(), get_drop_glue_type(ccx.shared(), g.ty()));
     let (llfn, _) = ccx.drop_glues().borrow().get(&g).unwrap().clone();
 
-    let mut bcx = Builder::entry_block(ccx, llfn);
+    let mut bcx = Builder::new_block(ccx, llfn, "entry-block");
 
     ccx.stats().n_glues_created.set(ccx.stats().n_glues_created.get() + 1);
     // All glue functions take values passed *by alias*; this is a
index 3848f3e0f6fdf1d512b531e9e5516277091ade95..9429a84e2315480319405bda32705e2aaa865711 100644 (file)
@@ -883,7 +883,7 @@ fn gen_fn<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx>,
         sig: ty::Binder(sig)
     }));
     let llfn = declare::define_internal_fn(ccx, name, rust_fn_ty);
-    let bcx = Builder::entry_block(ccx, llfn);
+    let bcx = Builder::new_block(ccx, llfn, "entry-block");
     trans(bcx);
     llfn
 }
index e83b79f11f4dcd09ade6274016eca2808966c860..aecba2f57e52cd156d0324f80fbf9f6c275d325e 100644 (file)
@@ -76,7 +76,7 @@ pub fn trans_object_shim<'a, 'tcx>(ccx: &'a CrateContext<'a, 'tcx>,
     let llfn = declare::define_internal_fn(ccx, &function_name, callee.ty);
     attributes::set_frame_pointer_elimination(ccx, llfn);
 
-    let bcx = Builder::entry_block(ccx, llfn);
+    let bcx = Builder::new_block(ccx, llfn, "entry-block");
 
     let mut llargs = get_params(llfn);
     let fn_ret = callee.ty.fn_ret();
index 603ded1c2d4ac1ac5d55358b728326b71738e2a3..824ee5b3c36b5d52c56282d1307cd1d5534fab1f 100644 (file)
@@ -210,7 +210,7 @@ pub fn trans_mir<'a, 'tcx: 'a>(
     debug!("fn_ty: {:?}", fn_ty);
     let debug_context =
         debuginfo::create_function_debug_context(ccx, instance, sig, abi, llfn, mir);
-    let bcx = Builder::entry_block(ccx, llfn);
+    let bcx = Builder::new_block(ccx, llfn, "entry-block");
 
     let cleanup_kinds = analyze::cleanup_kinds(&mir);