Module: Mesa Branch: main Commit: 5815a8e7460778491bbf0abbc97ca1f42b4f3831 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5815a8e7460778491bbf0abbc97ca1f42b4f3831
Author: Kai Wasserbäch <[email protected]> Date: Fri Oct 6 11:32:59 2023 +0200 fix: clover: LLVM 18 renamed/moved CGFT_*, update compat layer LLVm renamed and moved the CGFT_* stuff, we need to update the clover compat header to follow suit. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9833 Reference: https://github.com/llvm/llvm-project/commit/0a1aa6cda2758b0926a95f87d39ffefb1cb90200 Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Karol Herbst <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25586> --- src/gallium/frontends/clover/llvm/compat.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/frontends/clover/llvm/compat.hpp b/src/gallium/frontends/clover/llvm/compat.hpp index d2acaa8c58b..3b04adb88f2 100644 --- a/src/gallium/frontends/clover/llvm/compat.hpp +++ b/src/gallium/frontends/clover/llvm/compat.hpp @@ -68,8 +68,13 @@ namespace clover { namespace llvm { namespace compat { +#if LLVM_VERSION_MAJOR >= 18 + const auto CGFT_ObjectFile = ::llvm::CodeGenFileType::ObjectFile; + const auto CGFT_AssemblyFile = ::llvm::CodeGenFileType::AssemblyFile; +#else const auto CGFT_ObjectFile = ::llvm::CGFT_ObjectFile; const auto CGFT_AssemblyFile = ::llvm::CGFT_AssemblyFile; +#endif typedef ::llvm::CodeGenFileType CodeGenFileType; const clang::InputKind ik_opencl = clang::Language::OpenCL;
