| author | |
| committer | |
| log | 3697022a41ffa13a3971aeaf96b9c2b8de391ab1 |
| tree | 94e7a23c262fcb7b0427437502c72a845769b980 |
| parent | d83983527323201c44f90a2f57ff58c746116e11 |
Previously the frontend incorrectly called freeDecl for structs, which
never got allocateDecl called for them. There was simply a missing check
for hasCodeGenBits().1 files changed, 3 insertions(+), 1 deletions(-)
src/Module.zig+3-1| ... | ... | @@ -3499,9 +3499,11 @@ pub fn deleteDecl( |
| 3499 | 3499 | } |
| 3500 | 3500 | _ = mod.compile_log_decls.swapRemove(decl); |
| 3501 | 3501 | mod.deleteDeclExports(decl); |
| 3502 | mod.comp.bin_file.freeDecl(decl); | |
| 3503 | 3502 | |
| 3504 | 3503 | if (decl.has_tv) { |
| 3504 | if (decl.ty.hasCodeGenBits()) { | |
| 3505 | mod.comp.bin_file.freeDecl(decl); | |
| 3506 | } | |
| 3505 | 3507 | if (decl.getInnerNamespace()) |namespace| { |
| 3506 | 3508 | try namespace.deleteAllDecls(mod, outdated_decls); |
| 3507 | 3509 | } |