diff options
| author | mlugg <mlugg@mlugg.co.uk> | 2025-01-24 04:20:55 +0000 |
|---|---|---|
| committer | mlugg <mlugg@mlugg.co.uk> | 2025-01-24 22:33:23 +0000 |
| commit | 5a6666db5502079d9800ae3d41b790646238078e (patch) | |
| tree | 7f7ce3014e7c35c50dc35b0a5296da590dbb0d05 /src | |
| parent | dd334d5ee5344cfe773047ceeca6cbcfc896f57c (diff) | |
| download | zig-5a6666db5502079d9800ae3d41b790646238078e.tar.gz zig-5a6666db5502079d9800ae3d41b790646238078e.zip | |
all: update for `panic.unwrapError` and `panic.call` signature changes
Diffstat (limited to 'src')
| -rw-r--r-- | src/Sema.zig | 2 | ||||
| -rw-r--r-- | src/crash_report.zig | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Sema.zig b/src/Sema.zig index f2e52c2170..2c2841f27d 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -2584,7 +2584,7 @@ pub fn failWithOwnedErrorMsg(sema: *Sema, block: ?*Block, err_msg: *Zcu.ErrorMsg std.debug.print("compile error during Sema:\n", .{}); var error_bundle = wip_errors.toOwnedBundle("") catch @panic("out of memory"); error_bundle.renderToStdErr(.{ .ttyconf = .no_color }); - crash_report.compilerPanic("unexpected compile error occurred", null, null); + crash_report.compilerPanic("unexpected compile error occurred", null); } if (block) |start_block| { diff --git a/src/crash_report.zig b/src/crash_report.zig index 26096574d3..431381fce4 100644 --- a/src/crash_report.zig +++ b/src/crash_report.zig @@ -158,12 +158,12 @@ fn writeFilePath(file: *Zcu.File, writer: anytype) !void { try writer.writeAll(file.sub_file_path); } -pub fn compilerPanic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace, maybe_ret_addr: ?usize) noreturn { +pub fn compilerPanic(msg: []const u8, maybe_ret_addr: ?usize) noreturn { @branchHint(.cold); PanicSwitch.preDispatch(); const ret_addr = maybe_ret_addr orelse @returnAddress(); const stack_ctx: StackContext = .{ .current = .{ .ret_addr = ret_addr } }; - PanicSwitch.dispatch(error_return_trace, stack_ctx, msg); + PanicSwitch.dispatch(@errorReturnTrace(), stack_ctx, msg); } /// Attaches a global SIGSEGV handler |
