srctree

Jacob Young parent 9211938e b3aed4e2
link: report function failures in `FuncAnalysis`

This unblocks backend errors after #18814.

inlinesplit
src/link/Coff.zig added: 10, removed: 10, total 0
@@ -1154,7 +1154,7 @@ pub fn updateFunc(self: *Coff, mod: *Module, func_index: InternPool.Index, air:
const code = switch (res) {
.ok => code_buffer.items,
.fail => |em| {
decl.analysis = .codegen_failure;
func.analysis(&mod.intern_pool).state = .codegen_failure;
try mod.failed_decls.put(mod.gpa, decl_index, em);
return;
},
 
src/link/Elf/ZigObject.zig added: 10, removed: 10, total 0
@@ -1106,7 +1106,7 @@ pub fn updateFunc(
const code = switch (res) {
.ok => code_buffer.items,
.fail => |em| {
decl.analysis = .codegen_failure;
func.analysis(&mod.intern_pool).state = .codegen_failure;
try mod.failed_decls.put(mod.gpa, decl_index, em);
return;
},
 
src/link/MachO/ZigObject.zig added: 10, removed: 10, total 0
@@ -552,7 +552,7 @@ pub fn updateFunc(
const code = switch (res) {
.ok => code_buffer.items,
.fail => |em| {
decl.analysis = .codegen_failure;
func.analysis(&mod.intern_pool).state = .codegen_failure;
try mod.failed_decls.put(mod.gpa, decl_index, em);
return;
},
 
src/link/Plan9.zig added: 10, removed: 10, total 0
@@ -444,7 +444,7 @@ pub fn updateFunc(self: *Plan9, mod: *Module, func_index: InternPool.Index, air:
const code = switch (res) {
.ok => try code_buffer.toOwnedSlice(),
.fail => |em| {
decl.analysis = .codegen_failure;
func.analysis(&mod.intern_pool).state = .codegen_failure;
try mod.failed_decls.put(mod.gpa, decl_index, em);
return;
},
 
src/link/Wasm.zig added: 10, removed: 10, total 0
@@ -1515,7 +1515,7 @@ pub fn updateFunc(wasm: *Wasm, mod: *Module, func_index: InternPool.Index, air:
const code = switch (result) {
.ok => code_writer.items,
.fail => |em| {
decl.analysis = .codegen_failure;
func.analysis(&mod.intern_pool).state = .codegen_failure;
try mod.failed_decls.put(mod.gpa, decl_index, em);
return;
},