Skip to content

Commit ac01b56

Browse files
committed
librustc_trans: accommodate make tidy post cycle-breaking refactoring.
1 parent 0730b94 commit ac01b56

File tree

4 files changed

+24
-13
lines changed

4 files changed

+24
-13
lines changed

src/librustc_trans/trans/adt.rs

+11-8
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,9 @@ pub fn trans_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, r: &Repr<
931931
}
932932
}
933933

934-
pub fn struct_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, st: &Struct<'tcx>, val: ValueRef,
935-
ix: uint, needs_cast: bool) -> ValueRef {
934+
pub fn struct_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>,
935+
st: &Struct<'tcx>, val: ValueRef,
936+
ix: uint, needs_cast: bool) -> ValueRef {
936937
let val = if needs_cast {
937938
let ccx = bcx.ccx();
938939
let fields = st.fields.iter().map(|&ty| type_of::type_of(ccx, ty)).collect::<Vec<_>>();
@@ -946,10 +947,10 @@ pub fn struct_field_ptr<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, st: &Str
946947
}
947948

948949
pub fn fold_variants<'fcx, 'blk, 'tcx, F>(bcx: Block<'fcx, 'blk, 'tcx>,
949-
r: &Repr<'tcx>,
950-
value: ValueRef,
951-
mut f: F)
952-
-> Block<'fcx, 'blk, 'tcx> where
950+
r: &Repr<'tcx>,
951+
value: ValueRef,
952+
mut f: F)
953+
-> Block<'fcx, 'blk, 'tcx> where
953954
F: FnMut(Block<'fcx, 'blk, 'tcx>, &Struct<'tcx>, ValueRef) -> Block<'fcx, 'blk, 'tcx>,
954955
{
955956
let fcx = bcx.fcx;
@@ -989,8 +990,10 @@ pub fn fold_variants<'fcx, 'blk, 'tcx, F>(bcx: Block<'fcx, 'blk, 'tcx>,
989990
}
990991

991992
/// Access the struct drop flag, if present.
992-
pub fn trans_drop_flag_ptr<'fcx, 'blk, 'tcx>(mut bcx: Block<'fcx, 'blk, 'tcx>, r: &Repr<'tcx>, val: ValueRef)
993-
-> datum::DatumBlock<'fcx, 'blk, 'tcx, datum::Expr> {
993+
pub fn trans_drop_flag_ptr<'fcx, 'blk, 'tcx>(mut bcx: Block<'fcx, 'blk, 'tcx>,
994+
r: &Repr<'tcx>,
995+
val: ValueRef)
996+
-> datum::DatumBlock<'fcx, 'blk, 'tcx, datum::Expr> {
994997
let tcx = bcx.tcx();
995998
let ptr_ty = ty::mk_imm_ptr(bcx.tcx(), tcx.types.bool);
996999
match *r {

src/librustc_trans/trans/base.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,10 @@ pub fn load_ty<'fcx, 'blk, 'tcx>(cx: Block<'fcx, 'blk, 'tcx>,
10561056

10571057
/// Helper for storing values in memory. Does the necessary conversion if the in-memory type
10581058
/// differs from the type used for SSA values.
1059-
pub fn store_ty<'fcx, 'blk, 'tcx>(cx: Block<'fcx, 'blk, 'tcx>, v: ValueRef, dst: ValueRef, t: Ty<'tcx>) {
1059+
pub fn store_ty<'fcx, 'blk, 'tcx>(cx: Block<'fcx, 'blk, 'tcx>,
1060+
v: ValueRef,
1061+
dst: ValueRef,
1062+
t: Ty<'tcx>) {
10601063
if ty::type_is_bool(t) {
10611064
Store(cx, ZExt(cx, v, Type::i8(cx.ccx())), dst);
10621065
} else if type_is_immediate(cx.ccx(), t) && type_of::type_of(cx.ccx(), t).is_aggregate() {
@@ -1195,7 +1198,9 @@ fn memzero<'a, 'tcx>(b: &Builder<'a, 'tcx>, llptr: ValueRef, ty: Ty<'tcx>) {
11951198
b.call(llintrinsicfn, &[llptr, llzeroval, size, align, volatile], None);
11961199
}
11971200

1198-
pub fn alloc_ty<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, t: Ty<'tcx>, name: &str) -> ValueRef {
1201+
pub fn alloc_ty<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>,
1202+
t: Ty<'tcx>,
1203+
name: &str) -> ValueRef {
11991204
let _icx = push_ctxt("alloc_ty");
12001205
let ccx = bcx.ccx();
12011206
let ty = type_of::type_of(ccx, t);

src/librustc_trans/trans/common.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,8 @@ pub fn expr_ty<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, ex: &ast::Expr) -
992992
node_id_type(bcx, ex.id)
993993
}
994994

995-
pub fn expr_ty_adjusted<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, ex: &ast::Expr) -> Ty<'tcx> {
995+
pub fn expr_ty_adjusted<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>,
996+
ex: &ast::Expr) -> Ty<'tcx> {
996997
monomorphize_type(bcx, ty::expr_ty_adjusted(bcx.tcx(), ex))
997998
}
998999

src/librustc_trans/trans/glue.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,10 @@ fn trans_struct_drop<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>,
302302
})
303303
}
304304

305-
fn size_and_align_of_dst<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>, t: Ty<'tcx>, info: ValueRef)
306-
-> (ValueRef, ValueRef) {
305+
fn size_and_align_of_dst<'fcx, 'blk, 'tcx>(bcx: Block<'fcx, 'blk, 'tcx>,
306+
t: Ty<'tcx>,
307+
info: ValueRef)
308+
-> (ValueRef, ValueRef) {
307309
debug!("calculate size of DST: {}; with lost info: {}",
308310
bcx.ty_to_string(t), bcx.val_to_string(info));
309311
if type_is_sized(bcx.tcx(), t) {

0 commit comments

Comments
 (0)