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 <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25586>
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;