authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2023-06-12 22:01:33+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-06-12 14:22:19-07:00
log415dbe93d44a5f86deecc1501185d6bfd34f80b4
treeeb8e4da57a5eba70cd80dc48943a53631daac16a
parent9e61ba19e9cda344aa2094e9a671d98076164163

link: fix compile error with only-c


1 files changed, 1 insertions(+), 2 deletions(-)

src/link.zig+1-2
...@@ -562,10 +562,9 @@ pub const File = struct {...@@ -562,10 +562,9 @@ pub const File = struct {
562562
563 /// May be called before or after updateDeclExports for any given Decl.563 /// May be called before or after updateDeclExports for any given Decl.
564 pub fn updateFunc(base: *File, module: *Module, func_index: Module.Fn.Index, air: Air, liveness: Liveness) UpdateDeclError!void {564 pub fn updateFunc(base: *File, module: *Module, func_index: Module.Fn.Index, air: Air, liveness: Liveness) UpdateDeclError!void {
565 const func = module.funcPtr(func_index);
566 if (build_options.only_c) {565 if (build_options.only_c) {
567 assert(base.tag == .c);566 assert(base.tag == .c);
568 return @fieldParentPtr(C, "base", base).updateFunc(module, func, air, liveness);567 return @fieldParentPtr(C, "base", base).updateFunc(module, func_index, air, liveness);
569 }568 }
570 switch (base.tag) {569 switch (base.tag) {
571 // zig fmt: off570 // zig fmt: off