summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2017-01-26 15:28:12 +0900
committerMichel Dänzer <[email protected]>2017-01-27 09:53:14 +0900
commitd9f8bae616dd35f170949200d28105ce29e4b64c (patch)
tree885f8d89800ea6d8d1e54937833b4a9e016ab557 /src/gallium
parent9baf1ff8fc06d8c986e55465f77427d416ecd710 (diff)
clover: Fix build against clang SVN >= r293097
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/state_trackers/clover/llvm/compat.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp b/src/gallium/state_trackers/clover/llvm/compat.hpp
index 81592ce7021..906367b3146 100644
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
@@ -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;