diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 21:39:11 -0400 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-07-10 21:39:55 -0400 |
| commit | c2316c52285b1319d7b44a7f7135d9e79786fd77 (patch) | |
| tree | 966c3af5bb0ede2e3f1e7ec69a3bf920c0122914 /src/Compilation.zig | |
| parent | 98f3a262a7aec25e0a7f0872dc7fafc9008be1d2 (diff) | |
| download | zig-c2316c52285b1319d7b44a7f7135d9e79786fd77.tar.gz zig-c2316c52285b1319d7b44a7f7135d9e79786fd77.zip | |
InternPool: make `global_error_set` thread-safe
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index f4674ba20c..5bf6d57b88 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2943,7 +2943,7 @@ pub fn totalErrorCount(comp: *Compilation) u32 { } } - if (zcu.global_error_set.entries.len - 1 > zcu.error_limit) { + if (zcu.intern_pool.global_error_set.mutate.list.len > zcu.error_limit) { total += 1; } } @@ -3072,7 +3072,7 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle { try addModuleErrorMsg(zcu, &bundle, value.*, &all_references); } - const actual_error_count = zcu.global_error_set.entries.len - 1; + const actual_error_count = zcu.intern_pool.global_error_set.mutate.list.len; if (actual_error_count > zcu.error_limit) { try bundle.addRootErrorMessage(.{ .msg = try bundle.printString("ZCU used more errors than possible: used {d}, max {d}", .{ |
