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_blend.c | |
parent | 8f3fe7e2f0a3ce1a5c45fd204b0105f3b501e641 (diff) | |
download | external_mesa3d-d05cb9f0187984e461b41eb1ba6ca2adf0593c74.zip external_mesa3d-d05cb9f0187984e461b41eb1ba6ca2adf0593c74.tar.gz external_mesa3d-d05cb9f0187984e461b41eb1ba6ca2adf0593c74.tar.bz2 |
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_blend.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_test_blend.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_test_blend.c b/src/gallium/drivers/llvmpipe/lp_test_blend.c index 0c95555..d0389f0 100644 --- a/src/gallium/drivers/llvmpipe/lp_test_blend.c +++ b/src/gallium/drivers/llvmpipe/lp_test_blend.c @@ -37,6 +37,7 @@ */ +#include "gallivm/lp_bld_init.h" #include "gallivm/lp_bld_type.h" #include "gallivm/lp_bld_debug.h" #include "lp_bld_blend.h" @@ -485,8 +486,7 @@ test_one(unsigned verbose, { LLVMModuleRef module = NULL; LLVMValueRef func = NULL; - LLVMExecutionEngineRef engine = NULL; - LLVMModuleProviderRef provider = NULL; + LLVMExecutionEngineRef engine = lp_build_engine; LLVMPassManagerRef pass = NULL; char *error = NULL; blend_test_ptr_t blend_test_ptr; @@ -510,15 +510,6 @@ test_one(unsigned verbose, } LLVMDisposeMessage(error); - provider = LLVMCreateModuleProviderForExistingModule(module); - if (LLVMCreateJITCompiler(&engine, provider, 1, &error)) { - if(verbose < 1) - dump_blend_type(stderr, blend, mode, type); - fprintf(stderr, "%s\n", error); - LLVMDisposeMessage(error); - abort(); - } - #if 0 pass = LLVMCreatePassManager(); LLVMAddTargetData(LLVMGetExecutionEngineTargetData(engine), pass); @@ -735,7 +726,6 @@ test_one(unsigned verbose, LLVMFreeMachineCodeForFunction(engine, func); - LLVMDisposeExecutionEngine(engine); if(pass) LLVMDisposePassManager(pass); |