introduce and use ptradd/inbounds_ptradd instead of gep
This commit is contained in:
@@ -190,6 +190,12 @@ pub trait BuilderMethods<'a, 'tcx>:
|
||||
ptr: Self::Value,
|
||||
indices: &[Self::Value],
|
||||
) -> Self::Value;
|
||||
fn ptradd(&mut self, ptr: Self::Value, offset: Self::Value) -> Self::Value {
|
||||
self.gep(self.cx().type_i8(), ptr, &[offset])
|
||||
}
|
||||
fn inbounds_ptradd(&mut self, ptr: Self::Value, offset: Self::Value) -> Self::Value {
|
||||
self.inbounds_gep(self.cx().type_i8(), ptr, &[offset])
|
||||
}
|
||||
|
||||
fn trunc(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||
fn sext(&mut self, val: Self::Value, dest_ty: Self::Type) -> Self::Value;
|
||||
|
||||
Reference in New Issue
Block a user