aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakubtomsu <66876057+jakubtomsu@users.noreply.github.com>2023-10-25 15:47:39 +0200
committerGitHub <noreply@github.com>2023-10-25 15:47:39 +0200
commit37e33af34265104f54cb1626edce8537470f132f (patch)
treebd3902b3771296a572b73d3242ce3020ba4504c9
parentf7e05162547c9444261a215992ea3c39f22a90b6 (diff)
parent8e4bdcfb9837d70e94634db02e79a06036a3dde7 (diff)
Merge branch 'odin-lang:master' into union-tag-intrinsics
-rw-r--r--core/runtime/core.odin6
-rw-r--r--core/runtime/core_builtin.odin2
2 files changed, 4 insertions, 4 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin
index 8abe9938d..2d176f909 100644
--- a/core/runtime/core.odin
+++ b/core/runtime/core.odin
@@ -664,8 +664,10 @@ default_assertion_failure_proc :: proc(prefix, message: string, loc: Source_Code
when ODIN_OS == .Freestanding {
// Do nothing
} else {
- print_caller_location(loc)
- print_string(" ")
+ when !ODIN_DISABLE_ASSERT {
+ print_caller_location(loc)
+ print_string(" ")
+ }
print_string(prefix)
if len(message) > 0 {
print_string(": ")
diff --git a/core/runtime/core_builtin.odin b/core/runtime/core_builtin.odin
index 6ddd12a5e..a73a3d712 100644
--- a/core/runtime/core_builtin.odin
+++ b/core/runtime/core_builtin.odin
@@ -817,7 +817,6 @@ assert :: proc(condition: bool, message := "", loc := #caller_location) {
}
@builtin
-@(disabled=ODIN_DISABLE_ASSERT)
panic :: proc(message: string, loc := #caller_location) -> ! {
p := context.assertion_failure_proc
if p == nil {
@@ -827,7 +826,6 @@ panic :: proc(message: string, loc := #caller_location) -> ! {
}
@builtin
-@(disabled=ODIN_DISABLE_ASSERT)
unimplemented :: proc(message := "", loc := #caller_location) -> ! {
p := context.assertion_failure_proc
if p == nil {