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

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

fix(FTBFS): gallivm: 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/auxiliary/gallivm/lp_bld_misc.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp 
b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
index a79cbdf3baa..242168afd12 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
+++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp
@@ -56,7 +56,6 @@
 #include <llvm-c/ExecutionEngine.h>
 #include <llvm/Target/TargetOptions.h>
 #include <llvm/ExecutionEngine/ExecutionEngine.h>
-#include <llvm/ADT/Triple.h>
 #include <llvm/Analysis/TargetLibraryInfo.h>
 #include <llvm/ExecutionEngine/SectionMemoryManager.h>
 #include <llvm/Support/CommandLine.h>
@@ -67,6 +66,11 @@
 #if LLVM_VERSION_MAJOR >= 15
 #include <llvm/Support/MemoryBuffer.h>
 #endif
+#if LLVM_VERSION_MAJOR >= 17
+#include <llvm/TargetParser/Triple.h>
+#else
+#include <llvm/ADT/Triple.h>
+#endif
 
 #if LLVM_VERSION_MAJOR < 11
 #include <llvm/IR/CallSite.h>

Reply via email to