From c9b957c937ef457083f1a00c1343239086ef8796 Mon Sep 17 00:00:00 2001 From: Luuk de Gram Date: Fri, 3 Feb 2023 16:46:55 +0100 Subject: link: remove `FnData` and make it self-owned This finishes the work started in #14502 where atoms are owned by the linker themselves. This now makes debug atoms fully owned by dwarf, and no information is left stored on the decl. --- src/Module.zig | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/Module.zig') diff --git a/src/Module.zig b/src/Module.zig index 3bb15e78c3..3243c36ee5 100644 --- a/src/Module.zig +++ b/src/Module.zig @@ -531,9 +531,6 @@ pub const Decl = struct { /// What kind of a declaration is this. kind: Kind, - /// TODO remove this once Wasm backend catches up - fn_link: ?link.File.Wasm.FnData = null, - /// The shallow set of other decls whose typed_value could possibly change if this Decl's /// typed_value is modified. dependants: DepsTable = .{}, @@ -5247,11 +5244,6 @@ pub fn clearDecl( if (decl.has_tv) { if (decl.ty.isFnOrHasRuntimeBits()) { mod.comp.bin_file.freeDecl(decl_index); - - decl.fn_link = switch (mod.comp.bin_file.tag) { - .wasm => link.File.Wasm.FnData.empty, - else => null, - }; } if (decl.getInnerNamespace()) |namespace| { try namespace.deleteAllDecls(mod, outdated_decls); @@ -5652,10 +5644,6 @@ pub fn allocateNewDecl( .deletion_flag = false, .zir_decl_index = 0, .src_scope = src_scope, - .fn_link = switch (mod.comp.bin_file.tag) { - .wasm => link.File.Wasm.FnData.empty, - else => null, - }, .generation = 0, .is_pub = false, .is_exported = false, -- cgit v1.2.3