[llvm-commits] [PATCH] ExecutionEngine: fix ErrorStr handling

Eric Christopher echristo at apple.com
Mon May 16 13:06:14 PDT 2011


On May 13, 2011, at 1:41 PM, nobled wrote:

> On Wed, May 11, 2011 at 3:45 PM, Eric Christopher <echristo at apple.com> wrote:
>> 
>> On May 10, 2011, at 11:35 AM, nobled wrote:
>> 
>>>> Oops, I meant to paste this in the last message:
>>>> 
>>>> When I tried this patch, it causes the test to fail all by itself,
>>>> even though the "Engine.get() != NULL" assert doesn't trigger. It
>>>> gives this output:
>>>> 
>>>> Error building ExecutionEngine: Unable to find target for this triple
>>>> (no targets are registered)
>>>> 
>>>> Does that indicate a bug in the test?
>>>> 
>>> 
>>> I found the actual bug; the ExecutionEngine code was still setting
>>> ErrorStr in the case whenever using the JIT failed, even if the
>>> fallback to the interpreter was successful. The attached patch fixes
>>> that case, and now the first patch works fine.
>>> 
>>> Okay to commit?
>> 
>> Haven't looked a lot, but why not check to see if the engine is null
>> and if so, print out the error string?
> You're right, that's definitely better for the first patch. In the
> general case, though, is EngineBuilder's current behavior of giving an
> error on a successful fallback the right thing to do?

I think so for now. We may want it to do any number of other things in
the future. If you have ideas on how you think it should work I'm all
ears :)

-eric



More information about the llvm-commits mailing list