Пример #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;
 }