authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2024-02-07 01:44:48+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2024-02-07 07:12:32+00:00
logb3aed4e2c8b4d48b8b12f606f56e5aae7ec4693b
tree5f387c409a0801d371edfaf9396b1934b5fbaa5d
parent9211938e6ee8d84ce7a70b9193ed08f7e0b5aa95

link: report function failures in `FuncAnalysis`

This unblocks backend errors after #18814.

5 files changed, 5 insertions(+), 5 deletions(-)

src/link/Coff.zig+1-1
......@@ -1154,7 +1154,7 @@ pub fn updateFunc(self: *Coff, mod: *Module, func_index: InternPool.Index, air:
11541154 const code = switch (res) {
11551155 .ok => code_buffer.items,
11561156 .fail => |em| {
1157 decl.analysis = .codegen_failure;
1157 func.analysis(&mod.intern_pool).state = .codegen_failure;
11581158 try mod.failed_decls.put(mod.gpa, decl_index, em);
11591159 return;
11601160 },
src/link/Elf/ZigObject.zig+1-1
......@@ -1106,7 +1106,7 @@ pub fn updateFunc(
11061106 const code = switch (res) {
11071107 .ok => code_buffer.items,
11081108 .fail => |em| {
1109 decl.analysis = .codegen_failure;
1109 func.analysis(&mod.intern_pool).state = .codegen_failure;
11101110 try mod.failed_decls.put(mod.gpa, decl_index, em);
11111111 return;
11121112 },
src/link/MachO/ZigObject.zig+1-1
......@@ -552,7 +552,7 @@ pub fn updateFunc(
552552 const code = switch (res) {
553553 .ok => code_buffer.items,
554554 .fail => |em| {
555 decl.analysis = .codegen_failure;
555 func.analysis(&mod.intern_pool).state = .codegen_failure;
556556 try mod.failed_decls.put(mod.gpa, decl_index, em);
557557 return;
558558 },
src/link/Plan9.zig+1-1
......@@ -444,7 +444,7 @@ pub fn updateFunc(self: *Plan9, mod: *Module, func_index: InternPool.Index, air:
444444 const code = switch (res) {
445445 .ok => try code_buffer.toOwnedSlice(),
446446 .fail => |em| {
447 decl.analysis = .codegen_failure;
447 func.analysis(&mod.intern_pool).state = .codegen_failure;
448448 try mod.failed_decls.put(mod.gpa, decl_index, em);
449449 return;
450450 },
src/link/Wasm.zig+1-1
......@@ -1515,7 +1515,7 @@ pub fn updateFunc(wasm: *Wasm, mod: *Module, func_index: InternPool.Index, air:
15151515 const code = switch (result) {
15161516 .ok => code_writer.items,
15171517 .fail => |em| {
1518 decl.analysis = .codegen_failure;
1518 func.analysis(&mod.intern_pool).state = .codegen_failure;
15191519 try mod.failed_decls.put(mod.gpa, decl_index, em);
15201520 return;
15211521 },