@@ -2658,9 +2658,9 @@ fn get_ivec_len_and_data(&@block_ctxt bcx, ValueRef v, ty::t unit_ty) ->
2658
2658
tup ( ValueRef , ValueRef , @block_ctxt ) {
2659
2659
auto llunitty = type_of_or_i8 ( bcx, unit_ty) ;
2660
2660
2661
- auto stack_len = bcx. build . Load ( bcx. build . GEP ( v,
2661
+ auto stack_len = bcx. build . Load ( bcx. build . InBoundsGEP ( v,
2662
2662
[ C_int ( 0 ) , C_uint ( abi:: ivec_elt_len) ] ) ) ;
2663
- auto stack_elem = bcx. build . GEP ( v, [ C_int ( 0 ) ,
2663
+ auto stack_elem = bcx. build . InBoundsGEP ( v, [ C_int ( 0 ) ,
2664
2664
C_uint ( abi:: ivec_elt_elems) ] ) ;
2665
2665
stack_elem = bcx. build . PointerCast ( stack_elem,
2666
2666
T_ptr ( T_array ( llunitty, 0 u) ) ) ;
@@ -2673,7 +2673,7 @@ fn get_ivec_len_and_data(&@block_ctxt bcx, ValueRef v, ty::t unit_ty) ->
2673
2673
2674
2674
auto heap_stub = on_heap_cx. build . PointerCast ( v,
2675
2675
T_ptr ( T_ivec_heap ( llunitty) ) ) ;
2676
- auto heap_ptr = on_heap_cx. build . Load ( on_heap_cx. build . GEP (
2676
+ auto heap_ptr = on_heap_cx. build . Load ( on_heap_cx. build . InBoundsGEP (
2677
2677
heap_stub, [ C_int ( 0 ) , C_uint ( abi:: ivec_heap_stub_elt_ptr) ] ) ) ;
2678
2678
2679
2679
// Check whether the heap pointer is null. If it is, the vector length is
@@ -2695,9 +2695,10 @@ fn get_ivec_len_and_data(&@block_ctxt bcx, ValueRef v, ty::t unit_ty) ->
2695
2695
zero_len_cx. build . Br ( next_cx. llbb ) ;
2696
2696
2697
2697
// If we're here, then we actually have a heapified vector.
2698
- auto heap_len = nonzero_len_cx. build . Load ( nonzero_len_cx. build . GEP (
2699
- heap_ptr, [ C_int ( 0 ) , C_uint ( abi:: ivec_heap_elt_len) ] ) ) ;
2700
- auto heap_elem = nonzero_len_cx. build . GEP ( heap_ptr,
2698
+ auto heap_len = nonzero_len_cx. build . Load (
2699
+ nonzero_len_cx. build . InBoundsGEP ( heap_ptr,
2700
+ [ C_int ( 0 ) , C_uint ( abi:: ivec_heap_elt_len) ] ) ) ;
2701
+ auto heap_elem = nonzero_len_cx. build . InBoundsGEP ( heap_ptr,
2701
2702
[ C_int ( 0 ) , C_uint ( abi:: ivec_heap_elt_elems) ] ) ;
2702
2703
nonzero_len_cx. build . Br ( next_cx. llbb ) ;
2703
2704
0 commit comments