Debugging a NULL return from the ExecutionEngine

Hi all, I'm trying to upgrade from LLVM 2.5 -> 2.6, and when I create my
execution engine (ExecutionEngine::create(module)) I get back a null.

What's the easiest way for me to find out what went wrong?

You probably didn't call InitializeNativeTarget and ended up with no JIT
support.

Best regards,
--Edwin

Also note that there is a third optional std::string* argument which
if non-NULL gets set to an appropriate error message.

Reid

Reid Kleckner wrote:

Also note that there is a third optional std::string* argument which
if non-NULL gets set to an appropriate error message.

Cool, thanks. I wasn't sure how to work that :slight_smile:

Reid

>> Hi all, I'm trying to upgrade from LLVM 2.5 -> 2.6, and when I create my
>> execution engine (ExecutionEngine::create(module)) I get back a null.
>>
>> What's the easiest way for me to find out what went wrong?
>>
>>
>
> You probably didn't call InitializeNativeTarget and ended up with no JIT
> support.

Nope. Did that. It looks like native support wasn't getting registered,
though, which is odd because I thought InitializeNativeTarget() would take
care of that. Including <llvm/ExecutionEngine/JIT.h> fixes it.