aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-04-27 14:39:21 -0400
committerGitHub <noreply@github.com>2025-04-27 14:39:21 -0400
commit1b76d4c53adafebcbfcf0476276375353139dacb (patch)
tree5854ca686d0d016e2d109766fa17742fff27c6ac /lib/std/debug
parent227d2b15e449db1e84788d2c87e4f49100d316ca (diff)
parent2e9c1553ef40e9f21c2241294b8942369ef9007a (diff)
downloadzig-1b76d4c53adafebcbfcf0476276375353139dacb.tar.gz
zig-1b76d4c53adafebcbfcf0476276375353139dacb.zip
Merge pull request #22605 from dweiller/memmove
add `@memmove` builtin
Diffstat (limited to 'lib/std/debug')
-rw-r--r--lib/std/debug/no_panic.zig5
-rw-r--r--lib/std/debug/simple_panic.zig4
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/std/debug/no_panic.zig b/lib/std/debug/no_panic.zig
index 934751b937..ccecc89a87 100644
--- a/lib/std/debug/no_panic.zig
+++ b/lib/std/debug/no_panic.zig
@@ -135,6 +135,11 @@ pub fn memcpyAlias() noreturn {
@trap();
}
+pub fn memmoveLenMismatch() noreturn {
+ @branchHint(.cold);
+ @trap();
+}
+
pub fn noreturnReturned() noreturn {
@branchHint(.cold);
@trap();
diff --git a/lib/std/debug/simple_panic.zig b/lib/std/debug/simple_panic.zig
index 21016f395a..724061021f 100644
--- a/lib/std/debug/simple_panic.zig
+++ b/lib/std/debug/simple_panic.zig
@@ -128,6 +128,10 @@ pub fn memcpyAlias() noreturn {
call("@memcpy arguments alias", null);
}
+pub fn memmoveLenMismatch() noreturn {
+ call("@memmove arguments have non-equal lengths", null);
+}
+
pub fn noreturnReturned() noreturn {
call("'noreturn' function returned", null);
}