[llvm] 53bc1e0 - Change default exception model to Default in RuntimeLibcallsInfo (#228555)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 13:13:41 PDT 2026
Author: Devon Loehr
Date: 2026-10-03T20:13:31Z
New Revision: 53bc1e0115212039af7616f426ecbb7406126ebc
URL: https://github.com/llvm/llvm-project/commit/53bc1e0115212039af7616f426ecbb7406126ebc
DIFF: https://github.com/llvm/llvm-project/commit/53bc1e0115212039af7616f426ecbb7406126ebc.diff
LOG: Change default exception model to Default in RuntimeLibcallsInfo (#228555)
After #220052, `ExceptionModel::None` is treated as an explicit disable,
and `Default` is required to get the target's default behavior. It seems
like we missed a spot, so change the default value to `Default` to match
the new behavior.
This fixes a link failure in chromium: https://crbug.com/568747417
---------
Co-authored-by: Nico Weber <thakis at chromium.org>
Added:
Modified:
llvm/include/llvm/IR/RuntimeLibcalls.h
llvm/test/LTO/Resolution/X86/libcall-in-tu.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.h b/llvm/include/llvm/IR/RuntimeLibcalls.h
index 4ea0a7854f825..54ba52e2edda6 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.h
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.h
@@ -87,7 +87,7 @@ struct RuntimeLibcallsInfo {
LLVM_ABI explicit RuntimeLibcallsInfo(
const Triple &TT,
- ExceptionHandling ExceptionModel = ExceptionHandling::None,
+ ExceptionHandling ExceptionModel = ExceptionHandling::Default,
FloatABI::ABIType FloatABI = FloatABI::Default, StringRef ABIName = "",
VectorLibrary VecLib = VectorLibrary::NoLibrary);
diff --git a/llvm/test/LTO/Resolution/X86/libcall-in-tu.ll b/llvm/test/LTO/Resolution/X86/libcall-in-tu.ll
index cddf5d30697d0..3f2d08181e6de 100644
--- a/llvm/test/LTO/Resolution/X86/libcall-in-tu.ll
+++ b/llvm/test/LTO/Resolution/X86/libcall-in-tu.ll
@@ -8,7 +8,8 @@
; RUN: -r %t.o,foo,plx \
; RUN: -r %t.o,memcmp,x \
; RUN: -r %t.o,bcmp,pl \
-; RUN: -r %t.o,bcmp_impl,x %t.o -save-temps
+; RUN: -r %t.o,bcmp_impl,x \
+; RUN: -r %t.o,_Unwind_Resume,pl %t.o -save-temps
; RUN: llvm-dis %t.lto.o.0.4.opt.bc -o - | FileCheck %s
define i1 @foo(ptr %0, ptr %1, i64 %2) {
@@ -25,10 +26,16 @@ define i1 @foo(ptr %0, ptr %1, i64 %2) {
declare i32 @memcmp(ptr, ptr, i64)
declare i32 @bcmp_impl(ptr, ptr, i64)
-;; Ensure bcmp is not removed from module because it is external.
+;; Ensure bcmp and _Unwind_Resume are not removed from module
+;; because they are external libcalls.
; CHECK: define dso_local i32 @bcmp
define i32 @bcmp(ptr %0, ptr %1, i64 %2) noinline {
%r = call i32 @bcmp_impl(ptr %0, ptr %1, i64 %2)
ret i32 %r
}
+; CHECK: define dso_local void @_Unwind_Resume
+define void @_Unwind_Resume(ptr %0) noinline {
+ ret void
+}
+
More information about the llvm-commits
mailing list