<div dir="ltr"><span style="font-family:monospace">Tested-and-reviewed-by: Mike Lothian <<span style="color:rgb(255,255,255);background-color:rgb(0,0,0)"><a href="mailto:mike@fireburn.co.uk">mike@fireburn.co.uk</a></span>><br></span></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 27 Apr 2017 at 04:33 Michel Dänzer <<a href="mailto:michel@daenzer.net">michel@daenzer.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Michel Dänzer <<a href="mailto:michel.daenzer@amd.com" target="_blank">michel.daenzer@amd.com</a>><br>
<br>
Hardcode the OpenCL InputKind in compat::set_lang_defaults.<br>
<br>
Signed-off-by: Michel Dänzer <<a href="mailto:michel.daenzer@amd.com" target="_blank">michel.daenzer@amd.com</a>><br>
---<br>
 src/gallium/state_trackers/clover/llvm/compat.hpp     | 10 ++++++----<br>
 src/gallium/state_trackers/clover/llvm/invocation.cpp |  2 +-<br>
 2 files changed, 7 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp<br>
index cee51b9dd1..ee8c2a78e4 100644<br>
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp<br>
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp<br>
@@ -76,14 +76,16 @@ namespace clover {<br>
<br>
          inline void<br>
          set_lang_defaults(clang::CompilerInvocation &inv,<br>
-                           clang::LangOptions &lopts, clang::InputKind ik,<br>
+                           clang::LangOptions &lopts,<br>
                            const ::llvm::Triple &t,<br>
                            clang::PreprocessorOptions &ppopts,<br>
                            clang::LangStandard::Kind std) {<br>
-#if HAVE_LLVM >= 0x0309<br>
-            inv.setLangDefaults(lopts, ik, t, ppopts, std);<br>
+#if HAVE_LLVM >= 0x0500<br>
+            inv.setLangDefaults(lopts, clang::InputKind::OpenCL, t, ppopts, std);<br>
+#elif HAVE_LLVM >= 0x0309<br>
+            inv.setLangDefaults(lopts, clang::IK_OpenCL, t, ppopts, std);<br>
 #else<br>
-            inv.setLangDefaults(lopts, ik, std);<br>
+            inv.setLangDefaults(lopts, clang::IK_OpenCL, std);<br>
 #endif<br>
          }<br>
<br>
diff --git a/src/gallium/state_trackers/clover/llvm/invocation.cpp b/src/gallium/state_trackers/clover/llvm/invocation.cpp<br>
index deebef5726..64c0ec4c23 100644<br>
--- a/src/gallium/state_trackers/clover/llvm/invocation.cpp<br>
+++ b/src/gallium/state_trackers/clover/llvm/invocation.cpp<br>
@@ -126,7 +126,7 @@ namespace {<br>
       c->getDiagnosticOpts().ShowCarets = false;<br>
<br>
       compat::set_lang_defaults(c->getInvocation(), c->getLangOpts(),<br>
-                                clang::IK_OpenCL, ::llvm::Triple(target.triple),<br>
+                                ::llvm::Triple(target.triple),<br>
                                 c->getPreprocessorOpts(),<br>
                                 clang::LangStandard::lang_opencl11);<br>
<br>
--<br>
2.11.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</blockquote></div>