diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td index ec16995a4f57c..9d394af83ee7f 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; //===----------------------------------------------------------------------===// 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 WinArm64ECSjLjExceptionHandlingLibcalls = { } defvar ExceptionModelCallsArm64EC = (add - LibcallImpls<(add WinArm64ECDefaultExceptionHandlingLibcalls), + LibcallImpls<(add arm64ec___cxa_end_cleanup), ExceptionModelIsNotNone>, + LibcallImpls<(add arm64ec__Unwind_Resume), + ExceptionModelHasUnwindResume>, LibcallImpls<(add WinArm64ECSjLjExceptionHandlingLibcalls), ExceptionModelIsSjLj> );