ptr: fix offset intrinsic

This was intended to always use inbounds pointer arithmetic now.
This commit is contained in:
Daniel Micay 2013-09-13 17:13:17 -04:00
parent 05bbb480a2
commit 2dec95e417

View File

@ -402,11 +402,6 @@ pub fn trans_intrinsic(ccx: @mut CrateContext,
Ret(bcx, morestack_addr);
}
"offset" => {
let ptr = get_param(decl, first_real_arg);
let offset = get_param(decl, first_real_arg + 1);
Ret(bcx, GEP(bcx, ptr, [offset]));
}
"offset_inbounds" => {
let ptr = get_param(decl, first_real_arg);
let offset = get_param(decl, first_real_arg + 1);
Ret(bcx, InBoundsGEP(bcx, ptr, [offset]));