Search in sources :

Example 1 with Invoke

use of org.robovm.compiler.llvm.Invoke in project robovm by robovm.

the class Functions method invoke.

public static Value invoke(Function currentFunction, Value fn, BasicBlockRef success, BasicBlockRef failure, Value... args) {
    Variable result = null;
    Type returnType = ((FunctionType) fn.getType()).getReturnType();
    if (returnType != VOID) {
        result = currentFunction.newVariable(returnType);
    }
    currentFunction.add(new Invoke(result, fn, success, failure, args));
    return result == null ? null : result.ref();
}
Also used : PointerType(org.robovm.compiler.llvm.PointerType) Type(org.robovm.compiler.llvm.Type) FunctionType(org.robovm.compiler.llvm.FunctionType) Variable(org.robovm.compiler.llvm.Variable) FunctionType(org.robovm.compiler.llvm.FunctionType) Invoke(org.robovm.compiler.llvm.Invoke)

Aggregations

FunctionType (org.robovm.compiler.llvm.FunctionType)1 Invoke (org.robovm.compiler.llvm.Invoke)1 PointerType (org.robovm.compiler.llvm.PointerType)1 Type (org.robovm.compiler.llvm.Type)1 Variable (org.robovm.compiler.llvm.Variable)1