[LLVMdev] Runtime JIT: passing function pointers as values?
Benjamin Smedberg
benjamin at smedbergs.us
Sat Dec 1 07:32:03 PST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm a LLVM newbie who's started experimenting with the JIT, and I have a
couple questions relating to LLVM and the runtime JIT: I'm going to post
them as separate messages to avoid getting threads tangled up.
I want to call a C++ function from a function that was JITted at runtime.
I'm starting with HowToUseJIT.cpp as a base for experimentation. Is it
possible to take the address of the C++ function and pass it to the JIT
directly as a value, rather than referencing the function by a symbolic name?
That is, a class analagous to "ConstantInt" but for pointers:
"ConstantPtr::get(MyFunctionType, &MyCPPFunction)"
- --BDS
- --
Benjamin Smedberg
Platform Guru
Mozilla Corporation
benjamin at smedbergs.us
http://benjamin.smedbergs.us/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHUX5zSSwGp5sTYNkRAmA8AJ0VDsrIlzpJNE+zUg6sH9VsD2GZ5wCgjVOS
xkMrt2mAL1sX8iUUhcRAz9o=
=R/IP
-----END PGP SIGNATURE-----
More information about the llvm-dev
mailing list