diff options
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index bf8fd73e93..4efb845a82 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -1351,6 +1351,9 @@ pub fn totalErrorCount(self: *Compilation) usize { module.failed_exports.items().len + module.failed_files.items().len + @boolToInt(module.failed_root_src_file != null); + for (module.compile_log_decls.items()) |entry| { + total += entry.value.items.len; + } } // The "no entry point found" error only counts if there are no other errors. @@ -1407,6 +1410,15 @@ pub fn getAllErrorsAlloc(self: *Compilation) !AllErrors { }); try AllErrors.addPlain(&arena, &errors, msg); } + for (module.compile_log_decls.items()) |entry| { + const decl = entry.key; + const path = decl.scope.subFilePath(); + const source = try decl.scope.getSource(module); + for (entry.value.items) |src_loc| { + const err_msg = ErrorMsg{ .byte_offset = src_loc, .msg = "found compile log statement" }; + try AllErrors.add(&arena, &errors, path, source, err_msg); + } + } } if (errors.items.len == 0 and self.link_error_flags.no_entry_point_found) { |
