[LLVMdev] call/link to host program function

edA-qa mort-ora-y eda-qa at disemia.com
Mon Nov 12 11:05:59 PST 2012

I would like to have my IR call a function which exists in the host
program (the one which is creating the ExecutionEngine). I don't see
from the docs on Linker, ExecutionEngine, or Module how I would go about
doing this.

That is, I have a function like this in my C++ code:
	void callback( int64_t object, int32_t value );
I would like to produce IR which links back to this function and thus
can call back into the hosting code.

The IR is built at runtime in the same program hosting this function. I
use the JIT execution engine and then call runFunction.

edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 259 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121112/5f76e40d/attachment.sig>

More information about the llvm-dev mailing list