gallivm: fix build with LLVM 18

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25388>
This commit is contained in:
Marek Olšák 2023-09-25 15:46:59 -04:00 committed by Marge Bot
parent ebf9d6d9c3
commit 6060b656f8

View file

@ -250,7 +250,11 @@ struct ac_compiler_passes *ac_create_llvm_passes(LLVMTargetMachineRef tm)
TargetMachine *TM = reinterpret_cast<TargetMachine *>(tm);
if (TM->addPassesToEmitFile(p->passmgr, p->ostream, nullptr,
#if LLVM_VERSION_MAJOR >= 18
CodeGenFileType::ObjectFile)) {
#else
CGFT_ObjectFile)) {
#endif
fprintf(stderr, "amd: TargetMachine can't emit a file of this type!\n");
delete p;
return NULL;