@@ -892,7 +892,7 @@ pub fn trans_get_discr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr<'tcx>,
892892 let val = match * r {
893893 CEnum ( ity, min, max) => load_discr ( bcx, ity, scrutinee, min, max) ,
894894 General ( ity, ref cases, _) => {
895- let ptr = GEPi ( bcx, scrutinee, & [ 0 , 0 ] ) ;
895+ let ptr = StructGEP ( bcx, scrutinee, 0 ) ;
896896 load_discr ( bcx, ity, ptr, 0 , ( cases. len ( ) - 1 ) as Disr )
897897 }
898898 Univariant ( ..) => C_u8 ( bcx. ccx ( ) , 0 ) ,
@@ -986,13 +986,13 @@ pub fn trans_set_discr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, r: &Repr<'tcx>,
986986 Store ( bcx, C_u8 ( bcx. ccx ( ) , DTOR_NEEDED ) , ptr) ;
987987 }
988988 Store ( bcx, C_integral ( ll_inttype ( bcx. ccx ( ) , ity) , discr as u64 , true ) ,
989- GEPi ( bcx, val, & [ 0 , 0 ] ) ) ;
989+ StructGEP ( bcx, val, 0 ) ) ;
990990 }
991991 Univariant ( ref st, dtor) => {
992992 assert_eq ! ( discr, 0 ) ;
993993 if dtor_active ( dtor) {
994994 Store ( bcx, C_u8 ( bcx. ccx ( ) , DTOR_NEEDED ) ,
995- GEPi ( bcx, val, & [ 0 , st. fields . len ( ) - 1 ] ) ) ;
995+ StructGEP ( bcx, val, st. fields . len ( ) - 1 ) ) ;
996996 }
997997 }
998998 RawNullablePointer { nndiscr, nnty, ..} => {
@@ -1091,7 +1091,7 @@ pub fn struct_field_ptr<'blk, 'tcx>(bcx: Block<'blk, 'tcx>, st: &Struct<'tcx>, v
10911091 val
10921092 } ;
10931093
1094- GEPi ( bcx, val, & [ 0 , ix ] )
1094+ StructGEP ( bcx, val, ix )
10951095}
10961096
10971097pub fn fold_variants < ' blk , ' tcx , F > ( bcx : Block < ' blk , ' tcx > ,
@@ -1162,7 +1162,7 @@ pub fn trans_drop_flag_ptr<'blk, 'tcx>(mut bcx: Block<'blk, 'tcx>,
11621162 let ptr_ty = bcx. tcx ( ) . mk_imm_ptr ( tcx. dtor_type ( ) ) ;
11631163 match * r {
11641164 Univariant ( ref st, dtor) if dtor_active ( dtor) => {
1165- let flag_ptr = GEPi ( bcx, val, & [ 0 , st. fields . len ( ) - 1 ] ) ;
1165+ let flag_ptr = StructGEP ( bcx, val, st. fields . len ( ) - 1 ) ;
11661166 datum:: immediate_rvalue_bcx ( bcx, flag_ptr, ptr_ty) . to_expr_datumblock ( )
11671167 }
11681168 General ( _, _, dtor) if dtor_active ( dtor) => {
0 commit comments