diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-04-26 13:57:08 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-04-28 13:24:43 -0700 |
| commit | 6261c1373168b265047db5704d9d0fd5f2e458f2 (patch) | |
| tree | 18d6f31107b2c42ac9c6567b42f577bca41d769b /src/Compilation.zig | |
| parent | 57ea6207d3cb2db706bdc06c14605e4b901736dd (diff) | |
| download | zig-6261c1373168b265047db5704d9d0fd5f2e458f2.tar.gz zig-6261c1373168b265047db5704d9d0fd5f2e458f2.zip | |
update codebase to use `@memset` and `@memcpy`
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'; |
