[LLVMdev] calling member via JIT

Stefan Weigert weigert.stefan at googlemail.com
Tue Jul 28 08:13:49 PDT 2009


after a lot of tries i could assemble a pretty small version of what either 
triggers a bug in LLVM or is caused by misuse of LLVM on my side. i would be 
very happy, if someone with more experience with the JIT could have a look on 
my code.

the use-case:
	a class in a bitcode-file, loaded (jitted) by an app at runtime
	the app calls a static create inside the bitcode and then tries to call a 
		member function of that class

now that works, as long as there isn't the external shared library which holds 
the superclass for the class inside the bitcode. (does that work at all?)

the cmake should work as long as you have llvm in your path.
i use "cmake . -DCMAKE_BUILD_TYPE=DEBUG"
then you can run it with 
"bin/LLVM_JIT_Test bitcode/CMakeFiles/bitcode_mod.dir/BitcodeMod.cpp.o  
(assuming you are inside the project's directory)

thank you very much,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jit_test.tar.gz
Type: application/x-compressed-tar
Size: 2448 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090728/bb9ed651/attachment.bin>

More information about the llvm-dev mailing list