Example #1
0
func (ee ExecutionEngine) RunFunction(f Value, args []GenericValue) (g GenericValue) {
	nargs := len(args)
	var argptr *GenericValue
	if nargs > 0 {
		argptr = &args[0]
	}
	g.C = C.LLVMRunFunction(ee.C, f.C,
		C.unsigned(nargs), llvmGenericValueRefPtr(argptr))
	return
}
Example #2
0
func (ee ExecutionEngine) RunFunction(f Value, args []GenericValue) (g GenericValue) {
	g.C = C.LLVMRunFunction(ee.C, f.C,
		C.unsigned(len(args)), llvmGenericValueRefPtr(&args[0]))
	return
}