https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/164195
None >From 69a5b22cd1e47f53bbc779a6cb87ed94c55e39bd Mon Sep 17 00:00:00 2001 From: Matt Arsenault <[email protected]> Date: Mon, 20 Oct 2025 01:13:16 +0900 Subject: [PATCH] RuntimeLibcalls: Make sure _Unwind_Resume entries are mutually exclusive --- llvm/include/llvm/IR/RuntimeLibcalls.td | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td index e853f427d532a..243b864ccf033 100644 --- a/llvm/include/llvm/IR/RuntimeLibcalls.td +++ b/llvm/include/llvm/IR/RuntimeLibcalls.td @@ -59,6 +59,11 @@ def ExceptionModelIsNotNone : RuntimeLibcallPredicate< [{ExceptionModel != ExceptionHandling::None}] >; +def ExceptionModelHasUnwindResume : RuntimeLibcallPredicate< + [{ExceptionModel != ExceptionHandling::None && + ExceptionModel != ExceptionHandling::SjLj}] +>; + def ExceptionModelIsSjLj : RuntimeLibcallPredicate< [{ExceptionModel == ExceptionHandling::SjLj}] >; @@ -1153,8 +1158,10 @@ def __ssp_canary_word : RuntimeLibcallImpl<STACK_CHECK_GUARD>; //===----------------------------------------------------------------------===// defvar ExceptionModelCalls = (add - LibcallImpls<(add DefaultExceptionHandlingLibcalls), + LibcallImpls<(add __cxa_end_cleanup), ExceptionModelIsNotNone>, + LibcallImpls<(add _Unwind_Resume), + ExceptionModelHasUnwindResume>, LibcallImpls<(add SjLjExceptionHandlingLibcalls), ExceptionModelIsSjLj> ); @@ -1396,8 +1403,10 @@ defset list<RuntimeLibcallImpl> WinArm64ECSjLjExceptionHandlingLibcalls = { } defvar ExceptionModelCallsArm64EC = (add - LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls), + LibcallImpls<(add arm64ec___cxa_end_cleanup), ExceptionModelIsNotNone>, + LibcallImpls<(add arm64ec__Unwind_Resume), + ExceptionModelHasUnwindResume>, LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls), ExceptionModelIsSjLj> ); _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
