[LLVMdev] ExecutionEngine always comes back NULL

Rick Mann rmann at latencyzero.com
Tue Jan 8 07:08:36 PST 2013

I wrote a little OS X app to assemble some LLVM (human-readable) code and run it. Unfortunately, my ExecutionEngine won't create. Just comes back NULL.

This is the code that builds it:


This is the code it seems to successfully assemble, but it can't build the ExecutionEngine. You can see I tried several different ways of building it.


The module seems to get created properly (you can see the source and the result of mod->dump()).

Is there a dylib that I need to include that has some init code that's otherwise not invoked? How can I tell why my ExecutionEngine didn't create? Is there an error code somewhere?

I based my code off the HowTouseJIT.cpp example, llvm-as.cpp, and lli.cpp. I must've overlooked something, but I'm not sure what.

Any ideas? Thanks!


More information about the llvm-dev mailing list