[llvm-commits] [PATCH] ExecutionEngine: fix ErrorStr handling
nobled at dreamwidth.org
Fri May 13 13:41:01 PDT 2011
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?
More information about the llvm-commits