aboutsummaryrefslogtreecommitdiff
path: root/std/panic.zig
blob: 5be47b0c6e21c33bac3420c239d5080d3531b5bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// This file is included if and only if the user's main source file does not
// include a public panic function.
// If this file wants to import other files *by name*, support for that would
// have to be added in the compiler.

pub coldcc fn panic(message: []const u8) -> unreachable {
    if (@compileVar("os") == Os.freestanding) {
        while (true) {}
    } else {
        @import("std").debug.panic(message);
    }
}