[LLVMdev] transitions from C code to LLVM JIT code and back
Keith Bauer
onesadcookie at gmail.com
Mon Oct 15 15:02:33 PDT 2007
> What I have not seen an example of, and want to know if it's
> possible, is having LLVM generated code calling back out to plain C
> code during its run.
When I was first looking at LLVM, I googled a lot, and found somebody
saying to do it this way:
http://onesadcookie.com/trac/browser/AbandonedExperiments/Argh/CodeGen.g
(lines 43-51). I'm pretty sure now though that that's the wrong way
to do it, that you can just add an existing C function to LLVM's
function table and it'll get called automatically. There was somebody
talking about this on this list recently...
-Keith
More information about the llvm-dev
mailing list