clover: Fix build after llvm r309911
authorJan Vesely <jan.vesely@rutgers.edu>
Thu, 3 Aug 2017 21:26:07 +0000 (17:26 -0400)
committerJan Vesely <jan.vesely@rutgers.edu>
Fri, 4 Aug 2017 00:59:16 +0000 (20:59 -0400)
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/gallium/state_trackers/clover/llvm/codegen/native.cpp
src/gallium/state_trackers/clover/llvm/compat.hpp

index b9e675071928c8c7f77c45307b497adad4d1a78c..12c83a92b663bf5ea83bb765abc252900ddcc85c 100644 (file)
@@ -115,7 +115,7 @@ namespace {
       std::unique_ptr<TargetMachine> tm {
          t->createTargetMachine(target.triple, target.cpu, "", {},
                                 compat::default_reloc_model,
-                                ::llvm::CodeModel::Default,
+                                compat::default_code_model,
                                 ::llvm::CodeGenOpt::Default) };
       if (!tm)
          fail(r_log, build_error(),
index 06d3b6ffe6bf5e050545450b84db213893df80e4..b22ecfa6b2ea18de641e4d1e968a217e3de2261c 100644 (file)
@@ -174,6 +174,12 @@ namespace clover {
 #endif
          }
 
+#if HAVE_LLVM >= 0x0600
+         const auto default_code_model = ::llvm::None;
+#else
+         const auto default_code_model = ::llvm::CodeModel::Default;
+#endif
+
 #if HAVE_LLVM >= 0x0309
          const auto default_reloc_model = ::llvm::None;
 #else