clover: Prevent Clang from printing number of errors and warnings to stderr.
authorTom Stellard <thomas.stellard@amd.com>
Mon, 12 May 2014 20:32:29 +0000 (16:32 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Thu, 19 Jun 2014 14:18:26 +0000 (10:18 -0400)
https://bugs.freedesktop.org/show_bug.cgi?id=78581

CC: "10.1 10.2" <mesa-stable@lists.freedesktop.org>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index 82e262f2640f04da32dec0cd809ab2c0b1e5d961..0148721921ab624a476e38b3da9bbc3f1391743b 100644 (file)
@@ -187,6 +187,11 @@ namespace {
       c.getLangOpts().NoBuiltin = true;
       c.getTargetOpts().Triple = triple;
       c.getTargetOpts().CPU = processor;
+
+      // This is a workaround for a Clang bug which causes the number
+      // of warnings and errors to be printed to stderr.
+      // http://www.llvm.org/bugs/show_bug.cgi?id=19735
+      c.getDiagnosticOpts().ShowCarets = false;
 #if HAVE_LLVM <= 0x0301
       c.getInvocation().setLangDefaults(clang::IK_OpenCL);
 #else