Esempio n. 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;
 }
Esempio n. 2
0
 public LLVMConstant(SWIGTYPE_p_LLVMOpaqueValue val) {
   super(val);
   assert (Core.LLVMIsConstant(val) != 0);
 }
Esempio n. 3
0
 public LLVMConstantExpression bitCast(LLVMType targetType) {
   return new LLVMConstantExpression(Core.LLVMConstBitCast(instance, targetType.getInstance()));
 }
Esempio n. 4
0
 public LLVMConstantExpression negative() {
   return new LLVMConstantExpression(Core.LLVMConstNeg(instance));
 }
Esempio n. 5
0
 public LLVMConstantExpression not() {
   return new LLVMConstantExpression(Core.LLVMConstNot(instance));
 }
Esempio n. 6
0
 public boolean isUndef() {
   return Core.LLVMIsUndef(instance) != 0;
 }
Esempio n. 7
0
 public static LLVMConstant getUndef(LLVMType type) {
   return new LLVMConstant(Core.LLVMGetUndef(type.getInstance()));
 }
Esempio n. 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);
 }
Esempio n. 9
0
 public static LLVMConstant allOnes(LLVMType type) {
   return new LLVMConstant(Core.LLVMConstAllOnes(type.getInstance()));
 }
Esempio n. 10
0
 public boolean isNullValue() {
   return Core.LLVMIsNull(instance) != 0;
 }