[llvm] 6b885c3 - RuntimeLibcalls: Make sure _Unwind_Resume entries are mutually exclusive (#164195)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 26 21:08:45 PDT 2025
Author: Matt Arsenault
Date: 2025-10-26T21:08:41-07:00
New Revision: 6b885c3e5859270d7f76af8ba7f25f9ddb1e809f
URL: https://github.com/llvm/llvm-project/commit/6b885c3e5859270d7f76af8ba7f25f9ddb1e809f
DIFF: https://github.com/llvm/llvm-project/commit/6b885c3e5859270d7f76af8ba7f25f9ddb1e809f.diff
LOG: RuntimeLibcalls: Make sure _Unwind_Resume entries are mutually exclusive (#164195)
Added:
Modified:
llvm/include/llvm/IR/RuntimeLibcalls.td
Removed:
################################################################################
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<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>
);
More information about the llvm-commits
mailing list