aboutsummaryrefslogtreecommitdiff
path: root/src/Sema.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-04-21 23:05:36 -0700
committerAndrew Kelley <andrew@ziglang.org>2023-04-25 11:23:41 -0700
commit057c950093085e392fcdd6d6c8e7fb4356dd9959 (patch)
treef47a5292c6a6cba0800a0ab6ee8ed6cfdfd7c6bc /src/Sema.zig
parent25d11283b7b79edd383163cb2a72bd79dcf02dba (diff)
downloadzig-057c950093085e392fcdd6d6c8e7fb4356dd9959.tar.gz
zig-057c950093085e392fcdd6d6c8e7fb4356dd9959.zip
LLVM backend: support non-byte-sized memset
Also introduce memset_safe AIR tag and support it in C backend and LLVM backend.
Diffstat (limited to 'src/Sema.zig')
-rw-r--r--src/Sema.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Sema.zig b/src/Sema.zig
index 1b0ca80f18..5e16b9f3e5 100644
--- a/src/Sema.zig
+++ b/src/Sema.zig
@@ -21972,7 +21972,7 @@ fn zirMemset(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!void
try sema.requireRuntimeBlock(block, src, runtime_src);
_ = try block.addInst(.{
- .tag = .memset,
+ .tag = if (block.wantSafety()) .memset_safe else .memset,
.data = .{ .bin_op = .{
.lhs = dest_ptr,
.rhs = elem,