search for: intfuncty

Displaying 1 result from an estimated 1 matches for "intfuncty".

Did you mean: intfunc
2008 Oct 08
1
[LLVMdev] How can I create CallInst with a pointer to function
...tion with a pointer to a function? I want to have something like this: int factorial (int n) { return n==0 ? 1 : n*factorial(n-1); } typedef int (*intFunc) (int); intFunc fptr = factorial; Value * N = ConstantInt::get(Type::Int32Ty,10); irb.CreateCall(fptr,N); OR Function *F = Function::Create(intFuncTy,Function::ExternalLinkage,fptr,myModule); irb.CreateCall(F,N); Thanks