diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-29 00:19:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-29 00:19:55 -0700 |
| commit | d65b42e07caa00dfe2f2fbf221c593ce57882784 (patch) | |
| tree | 7926cbea1499e0affe930bf6d7455dc24adf014e /src/Compilation.zig | |
| parent | fd6200eda6d4fe19c34a59430a88a9ce38d6d7a4 (diff) | |
| parent | fa200ca0cad2705bad40eb723dedf4e3bf11f2ff (diff) | |
| download | zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.tar.gz zig-d65b42e07caa00dfe2f2fbf221c593ce57882784.zip | |
Merge pull request #15481 from ziglang/use-mem-intrinsics
actually use the new memory intrinsics
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f11f158e1b..a5b785cc67 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2165,7 +2165,7 @@ fn wholeCacheModeSetBinFilePath(comp: *Compilation, digest: *const [Cache.hex_di const digest_start = 2; // "o/[digest]/[basename]" if (comp.whole_bin_sub_path) |sub_path| { - mem.copy(u8, sub_path[digest_start..], digest); + @memcpy(sub_path[digest_start..][0..digest.len], digest); comp.bin_file.options.emit = .{ .directory = comp.local_cache_directory, @@ -2174,7 +2174,7 @@ fn wholeCacheModeSetBinFilePath(comp: *Compilation, digest: *const [Cache.hex_di } if (comp.whole_implib_sub_path) |sub_path| { - mem.copy(u8, sub_path[digest_start..], digest); + @memcpy(sub_path[digest_start..][0..digest.len], digest); comp.bin_file.options.implib_emit = .{ .directory = comp.local_cache_directory, @@ -4432,7 +4432,7 @@ pub fn addCCArgs( assert(prefix.len == prefix_len); var march_buf: [prefix_len + letters.len + 1]u8 = undefined; var march_index: usize = prefix_len; - mem.copy(u8, &march_buf, prefix); + @memcpy(march_buf[0..prefix.len], prefix); if (std.Target.riscv.featureSetHas(target.cpu.features, .e)) { march_buf[march_index] = 'e'; |
