I want a c program to execute a function using llvm IR instead of the c code. Is it possible? I do not want to convert the entire module. Only one function needs to be called in the end.
Asked
Active
Viewed 273 times
0
-
1possible duplicate of [Call LLVM Jit from c program](http://stackoverflow.com/questions/1838304/call-llvm-jit-from-c-program) – Ivan Aksamentov - Drop Feb 11 '15 at 10:21
-
I have tried that.Could someone possibly add the changes for it to work in llvm 3.5. – ajarmani Feb 11 '15 at 10:27
-
StackOverflow is about concrete problems. What is the problem with that solution? – Ivan Aksamentov - Drop Feb 11 '15 at 10:41
-
The code does not work in llvm 3.5.Some headers have changed probably.It would be nice if a solution is added for the latest version. – ajarmani Feb 11 '15 at 10:57
-
maybe you want to read chapter 4 of the kaleidoscope example http://llvm.org/docs/tutorial/LangImpl4.html it demonstrates how to use MCJIT to JIT llvm IR and call it. – Michael Haidl Feb 11 '15 at 11:32