@@ -288,7 +288,7 @@ fn mk_obstack_token(ccx: crate_ctxt, fcx: fn_ctxt) ->
288
288
// return type, use bump_ptr().
289
289
fn ptr_offs ( bcx : block , base : ValueRef , sz : ValueRef ) -> ValueRef {
290
290
let raw = PointerCast ( bcx, base, T_ptr ( T_i8 ( ) ) ) ;
291
- GEP ( bcx, raw, [ sz] )
291
+ InBoundsGEP ( bcx, raw, [ sz] )
292
292
}
293
293
294
294
// Increment a pointer by a given amount and then cast it to be a pointer
@@ -2402,12 +2402,12 @@ fn trans_index(cx: block, ex: @ast::expr, base: @ast::expr,
2402
2402
trans_fail ( bcx, some ( ex. span ) , "bounds check" )
2403
2403
} ;
2404
2404
let elt = if check type_has_static_size ( ccx, unit_ty) {
2405
- let elt_1 = GEP ( bcx, body, [ ix_val] ) ;
2405
+ let elt_1 = InBoundsGEP ( bcx, body, [ ix_val] ) ;
2406
2406
let llunitty = type_of ( ccx, unit_ty) ;
2407
2407
PointerCast ( bcx, elt_1, T_ptr ( llunitty) )
2408
2408
} else {
2409
2409
body = PointerCast ( bcx, body, T_ptr ( T_i8 ( ) ) ) ;
2410
- GEP ( bcx, body, [ scaled_ix] )
2410
+ InBoundsGEP ( bcx, body, [ scaled_ix] )
2411
2411
} ;
2412
2412
ret lval_owned( bcx, elt) ;
2413
2413
}
0 commit comments