mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
gallivm: Fix MCJIT with LLVM 3.3.
One needs to call setJITMemoryManager for LLVM 3.3, instead of setMCJITMemoryManager. This regressed in commits 065256df/75ad4fe7 when trying to make the code to build with LLVM 3.6. Tested MCJIT with LLVM 3.3 to 3.6. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
cf4105740f
commit
969ba8bfa7
1 changed files with 3 additions and 3 deletions
|
|
@ -602,7 +602,6 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
|
||||
ShaderMemoryManager *MM = NULL;
|
||||
if (useMCJIT) {
|
||||
#if HAVE_LLVM > 0x0303
|
||||
BaseMemoryManager* JMM = reinterpret_cast<BaseMemoryManager*>(CMM);
|
||||
MM = new ShaderMemoryManager(JMM);
|
||||
*OutCode = MM->getGeneratedCode();
|
||||
|
|
@ -610,9 +609,10 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
|
|||
#if HAVE_LLVM >= 0x0306
|
||||
builder.setMCJITMemoryManager(std::unique_ptr<RTDyldMemoryManager>(MM));
|
||||
MM = NULL; // ownership taken by std::unique_ptr
|
||||
#else
|
||||
#elif HAVE_LLVM > 0x0303
|
||||
builder.setMCJITMemoryManager(MM);
|
||||
#endif
|
||||
#else
|
||||
builder.setJITMemoryManager(MM);
|
||||
#endif
|
||||
} else {
|
||||
#if HAVE_LLVM < 0x0306
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue