authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-24 05:07:18+00:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2025-01-24 22:33:23+00:00
log38b47034f7f70b256c1f91569971bca1f970e9e0
tree111a7bfec829359589d6208a9f3ef43fab4482d6
parent5a6666db5502079d9800ae3d41b790646238078e
signaturelock-open Commit is signed but in an unrecognized format.

compiler_rt: upgrade to new panic interface


1 files changed, 1 insertions(+), 10 deletions(-)

lib/compiler_rt/common.zig+1-10
...@@ -78,16 +78,7 @@ pub const want_sparc_abi = builtin.cpu.arch.isSPARC();...@@ -78,16 +78,7 @@ pub const want_sparc_abi = builtin.cpu.arch.isSPARC();
7878
79// Avoid dragging in the runtime safety mechanisms into this .o file, unless79// Avoid dragging in the runtime safety mechanisms into this .o file, unless
80// we're trying to test compiler-rt.80// we're trying to test compiler-rt.
81pub const Panic = if (builtin.is_test) std.debug.FormattedPanic else struct {};81pub const panic = if (builtin.is_test) std.debug.FullPanic(std.debug.defaultPanic) else std.debug.no_panic;
82
83/// To be deleted after zig1.wasm is updated.
84pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, ret_addr: ?usize) noreturn {
85 if (builtin.is_test) {
86 std.debug.defaultPanic(msg, error_return_trace, ret_addr orelse @returnAddress());
87 } else {
88 unreachable;
89 }
90}
9182
92/// AArch64 is the only ABI (at the moment) to support f16 arguments without the83/// AArch64 is the only ABI (at the moment) to support f16 arguments without the
93/// need for extending them to wider fp types.84/// need for extending them to wider fp types.