elf: migrate to new non-allocateDeclIndexes API

This commit is contained in:
Jakub Konka
2023-01-26 13:17:38 +01:00
parent fb8d754a4b
commit e1b9800ffa
10 changed files with 175 additions and 163 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) {
.macho, .c => {}, // this linker backend has already migrated to the new API
.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);