summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/state_trackers/clover/llvm/invocation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp
index 6ab9025f209..77b02de7e9e 100644
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp
@@ -120,7 +120,12 @@ namespace {
c.getLangOpts().NoBuiltin = true;
c.getTargetOpts().Triple = triple;
+#if HAVE_LLVM <= 0x0301
c.getInvocation().setLangDefaults(clang::IK_OpenCL);
+#else
+ c.getInvocation().setLangDefaults(c.getLangOpts(), clang::IK_OpenCL,
+ clang::LangStandard::lang_opencl11);
+#endif
c.createDiagnostics(0, NULL, new clang::TextDiagnosticPrinter(
s_log, c.getDiagnosticOpts()));