Module: Mesa
Branch: main
Commit: efcb63938c195b765c530e6e6eff1d712bfc6e74
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=efcb63938c195b765c530e6e6eff1d712bfc6e74

Author: Kai Wasserbäch <[email protected]>
Date:   Sat Feb 11 18:12:01 2023 +0100

fix(FTBFS): clover: fix LLVM #include of Triple.h, moved to TargetParser

Upstream moved Triple.h from ADT to TargetParser in LLVM 17.

Reference: 
https://github.com/llvm/llvm-project/commit/62c7f035b4392c1933550eead6ddab35122720bc
Reviewed-by: Jesse Natalie <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21262>

---

 src/gallium/frontends/clover/llvm/compat.hpp | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/gallium/frontends/clover/llvm/compat.hpp 
b/src/gallium/frontends/clover/llvm/compat.hpp
index 83e2fcd8d2f..7bcf3d6860b 100644
--- a/src/gallium/frontends/clover/llvm/compat.hpp
+++ b/src/gallium/frontends/clover/llvm/compat.hpp
@@ -38,7 +38,6 @@
 
 #include <llvm/Config/llvm-config.h>
 
-#include <llvm/ADT/Triple.h>
 #include <llvm/Analysis/TargetLibraryInfo.h>
 #include <llvm/IR/LegacyPassManager.h>
 #include <llvm/IR/LLVMContext.h>
@@ -59,6 +58,12 @@
 #include <llvm/Support/TargetRegistry.h>
 #endif
 
+#if LLVM_VERSION_MAJOR >= 17
+#include <llvm/TargetParser/Triple.h>
+#else
+#include <llvm/ADT/Triple.h>
+#endif
+
 namespace clover {
    namespace llvm {
       namespace compat {

Reply via email to