clover: Fix build against clang SVN >= r293097
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 26 Jan 2017 06:28:12 +0000 (15:28 +0900)
committerMichel Dänzer <michel@daenzer.net>
Fri, 27 Jan 2017 00:53:14 +0000 (09:53 +0900)
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/llvm/compat.hpp

index 81592ce7021762892ac1f9e1c134e8785d324970..906367b3146b3e000334acb81bb3aeb00a09ad30 100644 (file)
@@ -83,7 +83,14 @@ namespace clover {
          inline void
          add_link_bitcode_file(clang::CodeGenOptions &opts,
                                const std::string &path) {
-#if HAVE_LLVM >= 0x0308
+#if HAVE_LLVM >= 0x0500
+            clang::CodeGenOptions::BitcodeFileToLink F;
+
+            F.Filename = path;
+            F.PropagateAttrs = true;
+            F.LinkFlags = ::llvm::Linker::Flags::None;
+            opts.LinkBitcodeFiles.emplace_back(F);
+#elif HAVE_LLVM >= 0x0308
             opts.LinkBitcodeFiles.emplace_back(::llvm::Linker::Flags::None, path);
 #else
             opts.LinkBitcodeFile = path;