summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2023-05-12 09:58:26 +0200
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2023-05-17 09:12:32 +0200
commit9ba416cdc67073cdda9a73fe9d37304b82bdd526 (patch)
tree0ea5a9b46bc6fb5b5a7ab44e10f69672afb888aa
parent518425d107f578207836ad4e4b2f26b12487b36f (diff)
downloadmesa-9ba416cdc67073cdda9a73fe9d37304b82bdd526.tar.gz
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>
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 24d082398e9..9e0d6a5f643 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -42,14 +42,14 @@
#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
+#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