示例#1
0
 public LLVMConstantExpression getElementPointer(LLVMConstant[] indices) {
   SWIGTYPE_p_p_LLVMOpaqueValue params = Core.new_LLVMValueRefArray(indices.length);
   for (int i = 0; i < indices.length; i++)
     Core.LLVMValueRefArray_setitem(params, i, indices[i].instance);
   LLVMConstantExpression result =
       new LLVMConstantExpression(Core.LLVMConstGEP(instance, params, indices.length));
   Core.delete_LLVMValueRefArray(params);
   return result;
 }
示例#2
0
 public LLVMConstant(SWIGTYPE_p_LLVMOpaqueValue val) {
   super(val);
   assert (Core.LLVMIsConstant(val) != 0);
 }
示例#3
0
 public LLVMConstantExpression bitCast(LLVMType targetType) {
   return new LLVMConstantExpression(Core.LLVMConstBitCast(instance, targetType.getInstance()));
 }
示例#4
0
 public LLVMConstantExpression negative() {
   return new LLVMConstantExpression(Core.LLVMConstNeg(instance));
 }
示例#5
0
 public LLVMConstantExpression not() {
   return new LLVMConstantExpression(Core.LLVMConstNot(instance));
 }
示例#6
0
 public boolean isUndef() {
   return Core.LLVMIsUndef(instance) != 0;
 }
示例#7
0
 public static LLVMConstant getUndef(LLVMType type) {
   return new LLVMConstant(Core.LLVMGetUndef(type.getInstance()));
 }
示例#8
0
 public static LLVMConstant constNull(LLVMType type) {
   SWIGTYPE_p_LLVMOpaqueValue val = Core.LLVMConstNull(type.getInstance());
   if (type instanceof LLVMPointerType) return new LLVMConstantPointer(val);
   else return new LLVMConstant(val);
 }
示例#9
0
 public static LLVMConstant allOnes(LLVMType type) {
   return new LLVMConstant(Core.LLVMConstAllOnes(type.getInstance()));
 }
示例#10
0
 public boolean isNullValue() {
   return Core.LLVMIsNull(instance) != 0;
 }