macho: completely remove allocateDeclIndexes in favor of linker tracking

This commit is contained in:
Jakub Konka
2023-01-24 17:55:10 +01:00
parent 48f9e491cb
commit 4d804c1b23
6 changed files with 115 additions and 88 deletions

View File

@@ -5324,7 +5324,7 @@ pub fn deleteUnusedDecl(mod: *Module, decl_index: Decl.Index) void {
// Until then, we did call `allocateDeclIndexes` on this anonymous Decl and so we
// must call `freeDecl` in the linker backend now.
switch (mod.comp.bin_file.tag) {
.c => {}, // this linker backend has already migrated to the new API
.macho, .c => {}, // this linker backend has already migrated to the new API
else => if (decl.has_tv) {
if (decl.ty.isFnOrHasRuntimeBits()) {
mod.comp.bin_file.freeDecl(decl_index);