aboutsummaryrefslogtreecommitdiff
path: root/src/arch/x86_64/CodeGen.zig
diff options
context:
space:
mode:
authormlugg <mlugg@mlugg.co.uk>2024-03-26 04:06:39 +0000
committermlugg <mlugg@mlugg.co.uk>2024-03-26 13:48:06 +0000
commit26a94e8481385619ae049143dd67e551f333fa3f (patch)
tree2106272eed6fb7b15a8309c6fc5137e6fec93234 /src/arch/x86_64/CodeGen.zig
parent152a2ceaf738301cd59165a4f17d915391321bdc (diff)
downloadzig-26a94e8481385619ae049143dd67e551f333fa3f.tar.gz
zig-26a94e8481385619ae049143dd67e551f333fa3f.zip
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`.
Diffstat (limited to 'src/arch/x86_64/CodeGen.zig')
-rw-r--r--src/arch/x86_64/CodeGen.zig2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/arch/x86_64/CodeGen.zig b/src/arch/x86_64/CodeGen.zig
index 8fe19d4e21..c5b815b429 100644
--- a/src/arch/x86_64/CodeGen.zig
+++ b/src/arch/x86_64/CodeGen.zig
@@ -12263,7 +12263,6 @@ fn genCall(self: *Self, info: union(enum) {
},
}) {
.func => |func| {
- try mod.markDeclAlive(mod.declPtr(func.owner_decl));
if (self.bin_file.cast(link.File.Elf)) |elf_file| {
const sym_index = try elf_file.zigObjectPtr().?.getOrCreateMetadataForDecl(elf_file, func.owner_decl);
const sym = elf_file.symbol(sym_index);
@@ -12323,7 +12322,6 @@ fn genCall(self: *Self, info: union(enum) {
},
.extern_func => |extern_func| {
const owner_decl = mod.declPtr(extern_func.decl);
- try mod.markDeclAlive(owner_decl);
const lib_name = mod.intern_pool.stringToSliceUnwrap(extern_func.lib_name);
const decl_name = mod.intern_pool.stringToSlice(owner_decl.name);
try self.genExternSymbolRef(.call, lib_name, decl_name);