summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2009-11-23 11:21:11 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-28 20:22:43 +0000
commit12ba3559785fa276b3b4b6fa06cfe551b87aecc3 (patch)
tree14be09439747ed9165374a09f8c5e59928690616
parenta0907a645f7d832e7c53d14c2ed88080b456a1a5 (diff)
llvmpipe: Use assert instead of abort. Only verify functions on debug builds.
-rw-r--r--src/gallium/drivers/llvmpipe/lp_jit.c2
-rw-r--r--src/gallium/drivers/llvmpipe/lp_state_fs.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
index b5aa7d680f1..7e019d4eda2 100644
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
@@ -166,7 +166,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);
diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index 48ec5e1b39f..2b6965deca8 100644
--- a/src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c
@@ -620,10 +620,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);