@@ -403,8 +403,8 @@ pub fn iter_structural_ty<'blk, 'tcx, F>(cx: Block<'blk, 'tcx>,
403403 let ( data_ptr, info) = if common:: type_is_sized ( cx. tcx ( ) , t) {
404404 ( av, None )
405405 } else {
406- let data = GEPi ( cx, av, & [ 0 , abi :: FAT_PTR_ADDR ] ) ;
407- let info = GEPi ( cx, av, & [ 0 , abi :: FAT_PTR_EXTRA ] ) ;
406+ let data = expr :: get_dataptr ( cx, av) ;
407+ let info = expr :: get_meta ( cx, av) ;
408408 ( Load ( cx, data) , Some ( Load ( cx, info) ) )
409409 } ;
410410
@@ -420,8 +420,8 @@ pub fn iter_structural_ty<'blk, 'tcx, F>(cx: Block<'blk, 'tcx>,
420420 llfld_a
421421 } else {
422422 let scratch = datum:: rvalue_scratch_datum ( cx, field_ty, "__fat_ptr_iter" ) ;
423- Store ( cx, llfld_a, GEPi ( cx, scratch. val , & [ 0 , abi :: FAT_PTR_ADDR ] ) ) ;
424- Store ( cx, info. unwrap ( ) , GEPi ( cx, scratch. val , & [ 0 , abi :: FAT_PTR_EXTRA ] ) ) ;
423+ Store ( cx, llfld_a, expr :: get_dataptr ( cx, scratch. val ) ) ;
424+ Store ( cx, info. unwrap ( ) , expr :: get_meta ( cx, scratch. val ) ) ;
425425 scratch. val
426426 } ;
427427 cx = f ( cx, val, field_ty) ;
@@ -835,7 +835,7 @@ pub fn store_ty<'blk, 'tcx>(cx: Block<'blk, 'tcx>, v: ValueRef, dst: ValueRef, t
835835
836836 if common:: type_is_fat_ptr ( cx. tcx ( ) , t) {
837837 Store ( cx, ExtractValue ( cx, v, abi:: FAT_PTR_ADDR ) , expr:: get_dataptr ( cx, dst) ) ;
838- Store ( cx, ExtractValue ( cx, v, abi:: FAT_PTR_EXTRA ) , expr:: get_len ( cx, dst) ) ;
838+ Store ( cx, ExtractValue ( cx, v, abi:: FAT_PTR_EXTRA ) , expr:: get_meta ( cx, dst) ) ;
839839 } else {
840840 let store = Store ( cx, from_arg_ty ( cx, v, t) , to_arg_ty_ptr ( cx, dst, t) ) ;
841841 unsafe {
@@ -1402,7 +1402,7 @@ pub fn create_datums_for_fn_args<'a, 'tcx>(mut bcx: Block<'a, 'tcx>,
14021402 arg_scope_id, ( data, extra) ,
14031403 |( data, extra) , bcx, dst| {
14041404 Store ( bcx, data, expr:: get_dataptr( bcx, dst) ) ;
1405- Store ( bcx, extra, expr:: get_len ( bcx, dst) ) ;
1405+ Store ( bcx, extra, expr:: get_meta ( bcx, dst) ) ;
14061406 bcx
14071407 } ) )
14081408 } else {
@@ -1428,12 +1428,12 @@ pub fn create_datums_for_fn_args<'a, 'tcx>(mut bcx: Block<'a, 'tcx>,
14281428 llval| {
14291429 for ( j, & tupled_arg_ty) in
14301430 tupled_arg_tys. iter( ) . enumerate( ) {
1431- let lldest = GEPi ( bcx, llval, & [ 0 , j ] ) ;
1431+ let lldest = StructGEP ( bcx, llval, j ) ;
14321432 if common:: type_is_fat_ptr( bcx. tcx( ) , tupled_arg_ty) {
14331433 let data = get_param( bcx. fcx. llfn, idx) ;
14341434 let extra = get_param( bcx. fcx. llfn, idx + 1 ) ;
14351435 Store ( bcx, data, expr:: get_dataptr( bcx, lldest) ) ;
1436- Store ( bcx, extra, expr:: get_len ( bcx, lldest) ) ;
1436+ Store ( bcx, extra, expr:: get_meta ( bcx, lldest) ) ;
14371437 idx += 2 ;
14381438 } else {
14391439 let datum = datum:: Datum :: new(
@@ -1835,7 +1835,7 @@ fn trans_enum_variant_or_tuple_like_struct<'a, 'tcx>(ccx: &CrateContext<'a, 'tcx
18351835 i) ;
18361836 if common:: type_is_fat_ptr ( bcx. tcx ( ) , arg_ty) {
18371837 Store ( bcx, get_param ( fcx. llfn , llarg_idx) , expr:: get_dataptr ( bcx, lldestptr) ) ;
1838- Store ( bcx, get_param ( fcx. llfn , llarg_idx + 1 ) , expr:: get_len ( bcx, lldestptr) ) ;
1838+ Store ( bcx, get_param ( fcx. llfn , llarg_idx + 1 ) , expr:: get_meta ( bcx, lldestptr) ) ;
18391839 llarg_idx += 2 ;
18401840 } else {
18411841 let arg = get_param ( fcx. llfn , llarg_idx) ;
0 commit comments