llvmpipe: Use assert instead of abort. Only verify functions on debug builds.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 23 Nov 2009 11:21:11 +0000 (11:21 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 24 Nov 2009 14:25:21 +0000 (14:25 +0000)
src/gallium/drivers/llvmpipe/lp_jit.c
src/gallium/drivers/llvmpipe/lp_state_fs.c

index 13535dd638e6146ba375e61d4f4abc1f04c2d4d1..c601c79480f7b8504cf42473fcacdf65f610f254 100644 (file)
@@ -167,7 +167,7 @@ lp_jit_screen_init(struct llvmpipe_screen *screen)
    if (LLVMCreateJITCompiler(&screen->engine, screen->provider, 1, &error)) {
       _debug_printf("%s\n", error);
       LLVMDisposeMessage(error);
-      abort();
+      assert(0);
    }
 
    screen->target = LLVMGetExecutionEngineTargetData(screen->engine);
index 2bde24430e4912d47b558d14ac336a6fabc29852..ee0f69b2af9723e6a58d74486de64225af5f3f7c 100644 (file)
@@ -622,10 +622,12 @@ generate_fragment(struct llvmpipe_context *lp,
     * Translate the LLVM IR into machine code.
     */
 
+#ifdef DEBUG
    if(LLVMVerifyFunction(variant->function, LLVMPrintMessageAction)) {
       LLVMDumpValue(variant->function);
-      abort();
+      assert(0);
    }
+#endif
 
    LLVMRunFunctionPassManager(screen->pass, variant->function);