[LLVMdev] Parsing (and compiling) on demand.

Nick Lewycky
Sat, 17 Apr 2010 07:08:02 -0000

lost wrote:
> Hi!
>
> I'm trying to develop JIT compiler using LLVM as its backend. I know
> LLVM itself supports JIT-compiling, but I need to generate IR first.
> I don't want to generate IR before function is actually needed. How
> can I achieve this?
> If it matters, I have prototypes for all functions I'm going to use.

See ExecutionEngine::InstallLazyFunctionCreator().
http://llvm.org/doxygen/classllvm_1_1ExecutionEngine.html#6a126d6cd1fa07a4331179597de0c46a

Nick