@@ -188,7 +188,6 @@ pub use self::TransBindingMode::*;
188188use self :: Opt :: * ;
189189use self :: FailureHandler :: * ;
190190
191- use back:: abi;
192191use llvm:: { ValueRef , BasicBlockRef } ;
193192use middle:: check_match:: StaticInliner ;
194193use middle:: check_match;
@@ -730,9 +729,8 @@ fn bind_subslice_pat(bcx: Block,
730729 let slice_ty = bcx. tcx ( ) . mk_imm_ref ( bcx. tcx ( ) . mk_region ( ty:: ReStatic ) ,
731730 bcx. tcx ( ) . mk_slice ( unit_ty) ) ;
732731 let scratch = rvalue_scratch_datum ( bcx, slice_ty, "" ) ;
733- Store ( bcx, slice_begin,
734- GEPi ( bcx, scratch. val , & [ 0 , abi:: FAT_PTR_ADDR ] ) ) ;
735- Store ( bcx, slice_len, GEPi ( bcx, scratch. val , & [ 0 , abi:: FAT_PTR_EXTRA ] ) ) ;
732+ Store ( bcx, slice_begin, expr:: get_dataptr ( bcx, scratch. val ) ) ;
733+ Store ( bcx, slice_len, expr:: get_meta ( bcx, scratch. val ) ) ;
736734 scratch. val
737735}
738736
@@ -909,14 +907,14 @@ fn compare_values<'blk, 'tcx>(cx: Block<'blk, 'tcx>,
909907 let ty_str_slice = cx. tcx ( ) . mk_static_str ( ) ;
910908
911909 let rhs_str = alloc_ty ( cx, ty_str_slice, "rhs_str" ) ;
912- Store ( cx, GEPi ( cx, rhs, & [ 0 , 0 ] ) , expr:: get_dataptr ( cx, rhs_str) ) ;
910+ Store ( cx, expr :: get_dataptr ( cx, rhs) , expr:: get_dataptr ( cx, rhs_str) ) ;
913911 Store ( cx, C_uint ( cx. ccx ( ) , pat_len) , expr:: get_meta ( cx, rhs_str) ) ;
914912
915913 let lhs_str;
916914 if val_ty ( lhs) == val_ty ( rhs) {
917915 // Both the discriminant and the pattern are thin pointers
918916 lhs_str = alloc_ty ( cx, ty_str_slice, "lhs_str" ) ;
919- Store ( cx, GEPi ( cx, lhs, & [ 0 , 0 ] ) , expr:: get_dataptr ( cx, lhs_str) ) ;
917+ Store ( cx, expr :: get_dataptr ( cx, lhs) , expr:: get_dataptr ( cx, lhs_str) ) ;
920918 Store ( cx, C_uint ( cx. ccx ( ) , pat_len) , expr:: get_meta ( cx, lhs_str) ) ;
921919 }
922920 else {
0 commit comments