llvmpipe: Use assert instead of abort. Only verify functions on debug builds.

This commit is contained in:
José Fonseca 2009-11-23 11:21:11 +00:00
parent 066991c8d1
commit 4ae3e88dc9
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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);