coff: migrate to new non-allocateDeclIndexes API

This commit is contained in:
Jakub Konka
2023-01-26 14:28:44 +01:00
parent e1b9800ffa
commit cc1d7a0e31
8 changed files with 209 additions and 202 deletions

View File

@@ -5324,7 +5324,12 @@ 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) {
.elf, .macho, .c => {}, // this linker backend has already migrated to the new API
.coff,
.elf,
.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);