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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user