summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2014-08-19 23:17:40 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2014-09-02 12:29:58 +0100
commit3fe59905fc684f64508982d405031771e273e656 (patch)
treee2b4814ea9a563520a098d8a1000491e259fec08 /src
parent8fe85c7742d91322682f2c415c9450b47d43a5ac (diff)
gallivm: Fix build with LLVM >= 3.6 r215967.
This LLVM 3.6 commit changed EngineBuilder constructor. commit 3f4ed32b4398eaf4fe0080d8001ba01e6c2f43c8 Author: Rafael Espindola <rafael.espindola@gmail.com> Date: Tue Aug 19 04:04:25 2014 +0000 Make it explicit that ExecutionEngine takes ownership of the modules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215967 91177308-0d34-0410-b5e6-96231b3b80d8 Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com> (cherry picked from commit c04a6d5c298f102469df45a7dbe81f40c6faed5f) Nominated-by: Marek Olšák <maraeo@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_misc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index 65c02d886d4..d85adfbec02 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -266,7 +266,11 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT,
using namespace llvm;
std::string Error;
+#if HAVE_LLVM >= 0x0306
+ EngineBuilder builder(std::unique_ptr<Module>(unwrap(M)));
+#else
EngineBuilder builder(unwrap(M));
+#endif
/**
* LLVM 3.1+ haven't more "extern unsigned llvm::StackAlignmentOverride" and