llvmpipe: only include old Transform includes when needed This fixes building with recent LLVM where these 2 .h files were removed. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671 Acked-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22980> Change-Id: I64e0af95fdd1fe7c81c4b654fa22031609e7eb4e Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/mesa/+/912522 Commit-Queue: Josh Gargus <jjosh@google.com> Reviewed-by: John Bauman <jbauman@google.com>
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 584ea73..ff0626a 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -42,15 +42,15 @@ #include <llvm/Config/llvm-config.h> #include <llvm-c/Analysis.h> -#include <llvm-c/Transforms/Scalar.h> -#if LLVM_VERSION_MAJOR >= 7 -#include <llvm-c/Transforms/Utils.h> -#endif #include <llvm-c/BitWriter.h> #if GALLIVM_USE_NEW_PASS == 1 #include <llvm-c/Transforms/PassBuilder.h> #elif GALLIVM_HAVE_CORO == 1 -#if LLVM_VERSION_MAJOR <= 8 && (defined(PIPE_ARCH_AARCH64) || defined (PIPE_ARCH_ARM) || defined(PIPE_ARCH_S390) || defined(PIPE_ARCH_MIPS64)) +#include <llvm-c/Transforms/Scalar.h> +#if LLVM_VERSION_MAJOR >= 7 +#include <llvm-c/Transforms/Utils.h> +#endif +#if LLVM_VERSION_MAJOR <= 8 && (DETECT_ARCH_AARCH64 || DETECT_ARCH_ARM || DETECT_ARCH_S390 || DETECT_ARCH_MIPS64) #include <llvm-c/Transforms/IPO.h> #endif #include <llvm-c/Transforms/Coroutines.h>