From 469270b91499632507a0a0cbb908a1b97f545b97 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 1 May 2026 11:51:39 +1000 Subject: [PATCH] gallivm: handle llvm 22 coroutine end change the coroutine end changed return value. Cc: mesa-stable Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/auxiliary/gallivm/lp_bld_coro.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/auxiliary/gallivm/lp_bld_coro.c b/src/gallium/auxiliary/gallivm/lp_bld_coro.c index 392332b4aea..7d81a5d96d9 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_coro.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_coro.c @@ -88,10 +88,18 @@ void lp_build_coro_end(struct gallivm_state *gallivm, LLVMValueRef coro_hdl) coro_end_args[2] = LLVMConstNull(LLVMTokenTypeInContext(gallivm->context)); num_args++; #endif + +#if LLVM_VERSION_MAJOR >= 22 + lp_build_intrinsic(gallivm->builder, + "llvm.coro.end", + LLVMVoidTypeInContext(gallivm->context), + coro_end_args, num_args, 0); +#else lp_build_intrinsic(gallivm->builder, "llvm.coro.end", LLVMInt1TypeInContext(gallivm->context), coro_end_args, num_args, 0); +#endif } void lp_build_coro_resume(struct gallivm_state *gallivm, LLVMValueRef coro_hdl)