From 415dbe93d44a5f86deecc1501185d6bfd34f80b4 Mon Sep 17 00:00:00 2001 From: mlugg Date: Mon, 12 Jun 2023 22:01:33 +0100 Subject: link: fix compile error with only-c --- src/link.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/link.zig') diff --git a/src/link.zig b/src/link.zig index e43153f0b1..c184f7ed7c 100644 --- a/src/link.zig +++ b/src/link.zig @@ -562,10 +562,9 @@ pub const File = struct { /// May be called before or after updateDeclExports for any given Decl. pub fn updateFunc(base: *File, module: *Module, func_index: Module.Fn.Index, air: Air, liveness: Liveness) UpdateDeclError!void { - const func = module.funcPtr(func_index); if (build_options.only_c) { assert(base.tag == .c); - return @fieldParentPtr(C, "base", base).updateFunc(module, func, air, liveness); + return @fieldParentPtr(C, "base", base).updateFunc(module, func_index, air, liveness); } switch (base.tag) { // zig fmt: off -- cgit v1.2.3