From 4a7f2258f2dea97158c236cb1730ba84d78dc6b7 Mon Sep 17 00:00:00 2001 From: Lone_Wolf Date: Wed, 13 May 2026 21:59:45 +0200 Subject: [PATCH] ac/llvm: fix build with LLVM 23 (MCSubtargetInfo) See the relevant LLVM change https://github.com/llvm/llvm-project/commit/d50631faad3003e73589528c83d3bbbad7ba72f1. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15470 Cc: mesa-stable Part-of: --- src/amd/llvm/ac_llvm_helper.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/amd/llvm/ac_llvm_helper.cpp b/src/amd/llvm/ac_llvm_helper.cpp index c14213d22eb..c10fa72e6b2 100644 --- a/src/amd/llvm/ac_llvm_helper.cpp +++ b/src/amd/llvm/ac_llvm_helper.cpp @@ -71,7 +71,11 @@ void ac_llvm_run_atexit_for_destructors(void) bool ac_is_llvm_processor_supported(LLVMTargetMachineRef tm, const char *processor) { TargetMachine *TM = reinterpret_cast(tm); - return TM->getMCSubtargetInfo()->isCPUStringValid(processor); + #if LLVM_VERSION_MAJOR >= 23 + return TM->getMCSubtargetInfo().isCPUStringValid(processor); + #else + return TM->getMCSubtargetInfo()->isCPUStringValid(processor); + #endif } void ac_reset_llvm_all_options_occurrences()