def gep(builder, ptr, *inds, **kws):
 name = kws.pop('name', '')
 inbounds = kws.pop('inbounds', False)
 assert (not kws)
 idx = []
 for i in inds:
  if isinstance(i, utils.INT_TYPES):
   ind = int32_t(i)
  else:
   ind = i
  idx.append(ind)
 return builder.gep(ptr, idx, name=name, inbounds=inbounds)

def gep ( builder , ptr , * inds , ** kws ) : name = kws . pop ( 'name' , '' ) inbounds = kws . pop ( 'inbounds' , False ) assert ( not kws ) idx = [ ] for i in inds : if isinstance ( i , utils . INT_TYPES ) : ind = int32_t ( i ) else : ind = i idx . append ( ind ) return builder . gep ( ptr , idx , name = name , inbounds = inbounds )
emit a getelementptr instruction for the given pointer and indices .