clover: Fix build with libclang v3.2
authorTom Stellard <thomas.stellard@amd.com>
Mon, 24 Sep 2012 21:07:55 +0000 (21:07 +0000)
committerTom Stellard <thomas.stellard@amd.com>
Tue, 25 Sep 2012 14:36:51 +0000 (14:36 +0000)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index 6ab9025f209279156ef037b287c6de11489cf309..77b02de7e9e4372164a7c7dbd2ebda82bf6383cf 100644 (file)
@@ -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()));