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: 0a1aa6cda2
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>
This commit is contained in:
Kai Wasserbäch
2023-10-06 11:32:59 +02:00
committed by Marge Bot
parent 752fba4643
commit 5815a8e746

View File

@@ -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;