From 26a94e8481385619ae049143dd67e551f333fa3f Mon Sep 17 00:00:00 2001 From: mlugg Date: Tue, 26 Mar 2024 04:06:39 +0000 Subject: Zcu: eliminate `Decl.alive` field Legacy anon decls now have three uses: * Type owner decls * Function owner decls * `@export` and `@extern` Therefore, there are no longer any cases where we wish to explicitly omit legacy anon decls from the binary. This means we can remove the concept of an "alive" vs "dead" `Decl`, which also allows us to remove the separate `anon_work_queue` in `Compilation`. --- src/Sema.zig | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/Sema.zig') diff --git a/src/Sema.zig b/src/Sema.zig index c0b78c3e1d..8dfd0248f5 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -6445,8 +6445,6 @@ pub fn analyzeExport( return sema.fail(block, src, "export target cannot be extern", .{}); } - // This decl is alive no matter what, since it's being exported - try mod.markDeclAlive(exported_decl); try sema.maybeQueueFuncBodyAnalysis(exported_decl_index); try addExport(mod, .{ -- cgit v1.2.3