llvmpipe: Use assert instead of abort. Only verify functions on debug builds.
This commit is contained in:
parent
066991c8d1
commit
4ae3e88dc9
|
@ -167,7 +167,7 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
|
||||||
if (LLVMCreateJITCompiler(&screen->engine, screen->provider, 1, &error)) {
|
if (LLVMCreateJITCompiler(&screen->engine, screen->provider, 1, &error)) {
|
||||||
_debug_printf("%s\n", error);
|
_debug_printf("%s\n", error);
|
||||||
LLVMDisposeMessage(error);
|
LLVMDisposeMessage(error);
|
||||||
abort();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
screen->target = LLVMGetExecutionEngineTargetData(screen->engine);
|
screen->target = LLVMGetExecutionEngineTargetData(screen->engine);
|
||||||
|
|
|
@ -622,10 +622,12 @@ generate_fragment(struct llvmpipe_context *lp,
|
||||||
* Translate the LLVM IR into machine code.
|
* Translate the LLVM IR into machine code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) {
|
if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) {
|
||||||
LLVMDumpValue(variant->function);
|
LLVMDumpValue(variant->function);
|
||||||
abort();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
LLVMRunFunctionPassManager(screen->pass, variant->function);
|
LLVMRunFunctionPassManager(screen->pass, variant->function);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue