def pack_array(builder, values, ty=None):
 n = len(values)
 if (ty is None):
  ty = values[0].type
 ary = ir.ArrayType(ty, n)(ir.Undefined)
 for (i, v) in enumerate(values):
  ary = builder.insert_value(ary, v, i)
 return ary

def pack_array ( builder , values , ty = None ) : n = len ( values ) if ( ty is None ) : ty = values [ 0 ] . type ary = ir . ArrayType ( ty , n ) ( ir . Undefined ) for ( i , v ) in enumerate ( values ) : ary = builder . insert_value ( ary , v , i ) return ary
pack a sequence of values in a llvm array .