clover: fix building fix clang-3.8
authorLaurent Carlier <lordheavym@gmail.com>
Wed, 28 Oct 2015 14:47:09 +0000 (15:47 +0100)
committerMichel Dänzer <michel.daenzer@amd.com>
Thu, 29 Oct 2015 03:35:37 +0000 (12:35 +0900)
https://bugs.freedesktop.org/show_bug.cgi?id=92705

v2.1: use Linker::Flags::None instead of 0 and emplace_back()

Signed-off-by: Laurent Carlier <lordheavym@gmail.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/llvm/invocation.cpp

index d74b50df45a504063767ba4a3a3922db554b7ad4..3b37f0802b042f65b977d5a177e9126e58381c8e 100644 (file)
@@ -247,8 +247,12 @@ namespace {
       // attribute.  This attribute will prevent Clang from creating
       // illegal uses of barrier() (e.g. Moving barrier() inside a conditional
       // that is no executed by all threads) during its optimizaton passes.
+#if HAVE_LLVM >= 0x0308
+      c.getCodeGenOpts().LinkBitcodeFiles.emplace_back(llvm::Linker::Flags::None,
+                                                       libclc_path);
+#else
       c.getCodeGenOpts().LinkBitcodeFile = libclc_path;
-
+#endif
       optimization_level = c.getCodeGenOpts().OptimizationLevel;
 
       // Compile the code