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:...@@ -1154,7 +1154,7 @@ pub fn updateFunc(self: *Coff, mod: *Module, func_index: InternPool.Index, air:
1154 const code = switch (res) {1154 const code = switch (res) {
1155 .ok => code_buffer.items,1155 .ok => code_buffer.items,
1156 .fail => |em| {1156 .fail => |em| {
1157 decl.analysis = .codegen_failure;1157 func.analysis(&mod.intern_pool).state = .codegen_failure;
1158 try mod.failed_decls.put(mod.gpa, decl_index, em);1158 try mod.failed_decls.put(mod.gpa, decl_index, em);
1159 return;1159 return;
1160 },1160 },
src/link/Elf/ZigObject.zig+1-1
...@@ -1106,7 +1106,7 @@ pub fn updateFunc(...@@ -1106,7 +1106,7 @@ pub fn updateFunc(
1106 const code = switch (res) {1106 const code = switch (res) {
1107 .ok => code_buffer.items,1107 .ok => code_buffer.items,
1108 .fail => |em| {1108 .fail => |em| {
1109 decl.analysis = .codegen_failure;1109 func.analysis(&mod.intern_pool).state = .codegen_failure;
1110 try mod.failed_decls.put(mod.gpa, decl_index, em);1110 try mod.failed_decls.put(mod.gpa, decl_index, em);
1111 return;1111 return;
1112 },1112 },
src/link/MachO/ZigObject.zig+1-1
...@@ -552,7 +552,7 @@ pub fn updateFunc(...@@ -552,7 +552,7 @@ pub fn updateFunc(
552 const code = switch (res) {552 const code = switch (res) {
553 .ok => code_buffer.items,553 .ok => code_buffer.items,
554 .fail => |em| {554 .fail => |em| {
555 decl.analysis = .codegen_failure;555 func.analysis(&mod.intern_pool).state = .codegen_failure;
556 try mod.failed_decls.put(mod.gpa, decl_index, em);556 try mod.failed_decls.put(mod.gpa, decl_index, em);
557 return;557 return;
558 },558 },
src/link/Plan9.zig+1-1
...@@ -444,7 +444,7 @@ pub fn updateFunc(self: *Plan9, mod: *Module, func_index: InternPool.Index, air:...@@ -444,7 +444,7 @@ pub fn updateFunc(self: *Plan9, mod: *Module, func_index: InternPool.Index, air:
444 const code = switch (res) {444 const code = switch (res) {
445 .ok => try code_buffer.toOwnedSlice(),445 .ok => try code_buffer.toOwnedSlice(),
446 .fail => |em| {446 .fail => |em| {
447 decl.analysis = .codegen_failure;447 func.analysis(&mod.intern_pool).state = .codegen_failure;
448 try mod.failed_decls.put(mod.gpa, decl_index, em);448 try mod.failed_decls.put(mod.gpa, decl_index, em);
449 return;449 return;
450 },450 },
src/link/Wasm.zig+1-1
...@@ -1515,7 +1515,7 @@ pub fn updateFunc(wasm: *Wasm, mod: *Module, func_index: InternPool.Index, air:...@@ -1515,7 +1515,7 @@ pub fn updateFunc(wasm: *Wasm, mod: *Module, func_index: InternPool.Index, air:
1515 const code = switch (result) {1515 const code = switch (result) {
1516 .ok => code_writer.items,1516 .ok => code_writer.items,
1517 .fail => |em| {1517 .fail => |em| {
1518 decl.analysis = .codegen_failure;1518 func.analysis(&mod.intern_pool).state = .codegen_failure;
1519 try mod.failed_decls.put(mod.gpa, decl_index, em);1519 try mod.failed_decls.put(mod.gpa, decl_index, em);
1520 return;1520 return;
1521 },1521 },