use of org.robovm.compiler.llvm.ConstantPtrtoint in project robovm by robovm.
the class Types method offsetof.
public static Constant offsetof(AggregateType type, int... idx) {
int[] i = new int[idx.length + 1];
i[0] = 0;
System.arraycopy(idx, 0, i, 1, idx.length);
return new ConstantPtrtoint(new ConstantGetelementptr(new NullConstant(new PointerType(type)), i), I32);
}
Aggregations