| author | |
| committer | |
| log | 2ce10e0838ea0ea6ba8a4a35e39936411a53e787 |
| tree | 6a7583c952510dd4ebe4b194130e5d5d15f15f2f |
| parent | 8b6cdc3d8224cf1e97a970f78281db2fcd14b7a2 |
- Compilation: renameTmpIntoCache doesn't need to be pub after the `translateC` change2 files changed, 3 insertions(+), 2 deletions(-)
lib/compiler/util.zig+2-1| ... | @@ -26,11 +26,12 @@ pub fn aroDiagnosticsToErrorBundle( | ... | @@ -26,11 +26,12 @@ pub fn aroDiagnosticsToErrorBundle( |
| 26 | for (d.output.to_list.messages.items) |msg| { | 26 | for (d.output.to_list.messages.items) |msg| { |
| 27 | switch (msg.kind) { | 27 | switch (msg.kind) { |
| 28 | .off, .warning => { | 28 | .off, .warning => { |
| 29 | // Emit any pending error and clear everything so that notes don't bleed into unassociated errors | ||
| 29 | if (cur_err) |err| { | 30 | if (cur_err) |err| { |
| 30 | try bundle.addRootErrorMessageWithNotes(err, cur_notes.items); | 31 | try bundle.addRootErrorMessageWithNotes(err, cur_notes.items); |
| 31 | // Clear the current error so that notes don't bleed into unassociated errors | ||
| 32 | cur_err = null; | 32 | cur_err = null; |
| 33 | } | 33 | } |
| 34 | cur_notes.clearRetainingCapacity(); | ||
| 34 | continue; | 35 | continue; |
| 35 | }, | 36 | }, |
| 36 | .note => if (cur_err == null) continue, | 37 | .note => if (cur_err == null) continue, |
src/Compilation.zig+1-1| ... | @@ -3398,7 +3398,7 @@ fn flush( | ... | @@ -3398,7 +3398,7 @@ fn flush( |
| 3398 | /// Linker backends which do not have this requirement can fall back to the simple | 3398 | /// Linker backends which do not have this requirement can fall back to the simple |
| 3399 | /// implementation at the bottom of this function. | 3399 | /// implementation at the bottom of this function. |
| 3400 | /// This function is only called when CacheMode is `whole`. | 3400 | /// This function is only called when CacheMode is `whole`. |
| 3401 | pub fn renameTmpIntoCache( | 3401 | fn renameTmpIntoCache( |
| 3402 | cache_directory: Cache.Directory, | 3402 | cache_directory: Cache.Directory, |
| 3403 | tmp_dir_sub_path: []const u8, | 3403 | tmp_dir_sub_path: []const u8, |
| 3404 | o_sub_path: []const u8, | 3404 | o_sub_path: []const u8, |