authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-12 21:57:14+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2024-08-13 13:30:24+02:00
logf968dd0cb1fc9197fc6483ce235b037f6c86c8ce
tree67404d9fb0b98411654f35aeebdc6809a17a37a4
parent5fd53dc36fb019a0930a9be0700411bb04c688a1

comp: actually report codegen errors


1 files changed, 7 insertions(+), 0 deletions(-)

src/Compilation.zig+7
......@@ -3092,6 +3092,10 @@ pub fn totalErrorCount(comp: *Compilation) u32 {
30923092 if (zcu.intern_pool.global_error_set.getNamesFromMainThread().len > zcu.error_limit) {
30933093 total += 1;
30943094 }
3095
3096 for (zcu.failed_codegen.keys()) |_| {
3097 total += 1;
3098 }
30953099 }
30963100
30973101 // The "no entry point found" error only counts if there are no semantic analysis errors.
......@@ -3237,6 +3241,9 @@ pub fn getAllErrorsAlloc(comp: *Compilation) !ErrorBundle {
32373241 }
32383242 }
32393243 }
3244 for (zcu.failed_codegen.values()) |error_msg| {
3245 try addModuleErrorMsg(zcu, &bundle, error_msg.*, &all_references);
3246 }
32403247 for (zcu.failed_exports.values()) |value| {
32413248 try addModuleErrorMsg(zcu, &bundle, value.*, &all_references);
32423249 }