summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Watry <[email protected]>2018-03-21 20:21:51 -0500
committerAaron Watry <[email protected]>2018-03-21 21:03:23 -0500
commit23100acc8f1a7bfbe57febf7e5f3e8ef4d053fec (patch)
treee280ee59e0240b7f5a557c47eb35f952d1ad0f33
parentc135316555ccd052da544e79166f81dece55cebb (diff)
clover/llvm: Fix build against LLVM/Clang 4.0
The opencl 1.0 langstandard was renamed in 5.0+ v2: Move preprocessor check into compat.hpp Reviewed-by: Francisco Jerez <[email protected]>
-rw-r--r--src/gallium/state_trackers/clover/llvm/compat.hpp2
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
index 19528a0133f..2e070b2eefc 100644
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
@@ -89,8 +89,10 @@ namespace clover {
#if HAVE_LLVM >= 0x0500
const clang::InputKind ik_opencl = clang::InputKind::OpenCL;
+ const clang::LangStandard::Kind lang_opencl10 = clang::LangStandard::lang_opencl10;
#else
const clang::InputKind ik_opencl = clang::IK_OpenCL;
+ const clang::LangStandard::Kind lang_opencl10 = clang::LangStandard::lang_opencl;
#endif
inline void
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index af78c2ae284..b2c64bc48f8 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -85,7 +85,7 @@ namespace {
};
const clc_version_lang_std cl_version_lang_stds[] = {
- { 100, clang::LangStandard::lang_opencl10},
+ { 100, compat::lang_opencl10},
{ 110, clang::LangStandard::lang_opencl11},
{ 120, clang::LangStandard::lang_opencl12},
{ 200, clang::LangStandard::lang_opencl20},