diff options
author | Brian Paul <brianp@vmware.com> | 2010-07-29 12:49:12 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-07-29 12:51:45 -0600 |
commit | d05cb9f0187984e461b41eb1ba6ca2adf0593c74 (patch) | |
tree | 0be1dde26a25e4d9e00ea7836a8ecdcb64fc9374 /src/gallium/drivers/llvmpipe/lp_test_round.c | |
parent | 8f3fe7e2f0a3ce1a5c45fd204b0105f3b501e641 (diff) |
llvmpipe: don't call LLVMCreateJITCompiler() twice
Fixes a failed assertion with LLVM 2.6:
<unnamed>::JITResolver::JITResolver(llvm::JIT&): Assertion
`TheJITResolver == 0&& "Multiple JIT resolvers?"' failed.
Though, not everyone seems to experience this problem.
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_test_round.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_round.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_round.c b/src/gallium/drivers/llvmpipe/lp_test_round.c index f571a81a4a..57b0ee5776 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_round.c +++ b/src/gallium/drivers/llvmpipe/lp_test_round.c @@ -31,7 +31,7 @@ #include "util/u_pointer.h" #include "gallivm/lp_bld.h" -#include "gallivm/lp_bld_printf.h" +#include "gallivm/lp_bld_init.h" #include "gallivm/lp_bld_arit.h" #include <llvm-c/Analysis.h> @@ -121,8 +121,7 @@ test_round(unsigned verbose, FILE *fp) { LLVMModuleRef module = NULL; LLVMValueRef test_round = NULL, test_trunc, test_floor, test_ceil; - LLVMExecutionEngineRef engine = NULL; - LLVMModuleProviderRef provider = NULL; + LLVMExecutionEngineRef engine = lp_build_engine; LLVMPassManagerRef pass = NULL; char *error = NULL; test_round_t round_func, trunc_func, floor_func, ceil_func; @@ -145,13 +144,6 @@ test_round(unsigned verbose, FILE *fp) } LLVMDisposeMessage(error); - provider = LLVMCreateModuleProviderForExistingModule(module); - if (LLVMCreateJITCompiler(&engine, provider, 1, &error)) { - fprintf(stderr, "%s\n", error); - LLVMDisposeMessage(error); - abort(); - } - #if 0 pass = LLVMCreatePassManager(); LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), pass); |