summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/llvm
diff options
context:
space:
mode:
authorJan Vesely <[email protected]>2017-08-03 17:26:07 -0400
committerJan Vesely <[email protected]>2017-08-03 20:59:16 -0400
commit08f44a497c97de6162a95c06c902e47bfedad5fe (patch)
treef3f83e2d0c063f2fc2ea0b24017058b75ee16bbf /src/gallium/state_trackers/clover/llvm
parentda942a4b81312c64459b3b54cfd8889cbc2a14aa (diff)
clover: Fix build after llvm r309911
Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/llvm')
-rw-r--r--src/gallium/state_trackers/clover/llvm/codegen/native.cpp2
-rw-r--r--src/gallium/state_trackers/clover/llvm/compat.hpp6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/codegen/native.cpp b/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
index b9e67507192..12c83a92b66 100644
--- a/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
+++ b/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
@@ -115,7 +115,7 @@ namespace {
std::unique_ptr<TargetMachine> tm {
t->createTargetMachine(target.triple, target.cpu, "", {},
compat::default_reloc_model,
- ::llvm::CodeModel::Default,
+ compat::default_code_model,
::llvm::CodeGenOpt::Default) };
if (!tm)
fail(r_log, build_error(),
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
index 06d3b6ffe6b..b22ecfa6b2e 100644
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
@@ -174,6 +174,12 @@ namespace clover {
#endif
}
+#if HAVE_LLVM >= 0x0600
+ const auto default_code_model = ::llvm::None;
+#else
+ const auto default_code_model = ::llvm::CodeModel::Default;
+#endif
+
#if HAVE_LLVM >= 0x0309
const auto default_reloc_model = ::llvm::None;
#else