summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_test_printf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_printf.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_test_printf.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_printf.c b/src/gallium/drivers/llvmpipe/lp_test_printf.c
index 21df83f9d8..4653f30e39 100644
--- a/src/gallium/drivers/llvmpipe/lp_test_printf.c
+++ b/src/gallium/drivers/llvmpipe/lp_test_printf.c
@@ -31,6 +31,8 @@
#include "util/u_pointer.h"
#include "gallivm/lp_bld.h"
+#include "gallivm/lp_bld_init.h"
+#include "gallivm/lp_bld_assert.h"
#include "gallivm/lp_bld_printf.h"
#include <llvm-c/Analysis.h>
@@ -74,6 +76,10 @@ add_printf_test(LLVMModuleRef module)
lp_build_printf(builder, "hello, world\n");
lp_build_printf(builder, "print 5 6: %d %d\n", LLVMConstInt(LLVMInt32Type(), 5, 0),
LLVMConstInt(LLVMInt32Type(), 6, 0));
+
+ /* Also test lp_build_assert(). This should not fail. */
+ lp_build_assert(builder, LLVMConstInt(LLVMInt32Type(), 1, 0), "assert(1)");
+
LLVMBuildRetVoid(builder);
LLVMDisposeBuilder(builder);
return func;
@@ -107,11 +113,16 @@ test_printf(unsigned verbose, FILE *fp, const struct printf_test_case *testcase)
LLVMDisposeMessage(error);
provider = LLVMCreateModuleProviderForExistingModule(module);
+#if 0
if (LLVMCreateJITCompiler(&engine, provider, 1, &error)) {
fprintf(stderr, "%s\n", error);
LLVMDisposeMessage(error);
abort();
}
+#else
+ (void) provider;
+ engine = lp_build_engine;
+#endif
#if 0
pass = LLVMCreatePassManager();