LLVMGetPointerToFunction

Hi,

Is there such a function (or a similar one) which is callable using the c-binding llvm?

Many thanks,

Georg

I’m not aware of whether one exists in 2.7 (it didn’t in 2.6 IIRC), but it’s pretty easy to write one up for yourself if necessary. I did something like this using 2.6:

void *LLVMGetPointerToFunction(LLVMExecutionEngineRef compiler, LLVMValueRef function) {
llvm::ExecutionEngine *cppCompiler = llvm::unwrap(compiler);
llvm::Function *cppFunction = llvm::unwrapllvm::Function(function);
return cppCompiler->getPointerToFunction(cppFunction);
}

Rob