diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2022-03-30 11:03:50 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-03-30 14:21:13 -0400 |
| commit | f5d9160f1b9fcf7b459c6746e8256d349f0c6873 (patch) | |
| tree | 36c800efa12843c80f3544e3ca06f89bc7076954 /src/Module.zig | |
| parent | b73cf97c93bb23150475ac0c23aadf86dbd71bc4 (diff) | |
| download | zig-f5d9160f1b9fcf7b459c6746e8256d349f0c6873.tar.gz zig-f5d9160f1b9fcf7b459c6746e8256d349f0c6873.zip | |
dwarf: pass DeclState around instead of storing a temp global in Dwarf
Avoids many pitfalls connected with premature/early return in case
there are errors with Decl, etc. This is effectively bringing back
the old design however in a much nicer packaging, where every
mechanism related to tracking Decl's debug info is now nicely
wrapped in a single struct (aka the `DeclState`). This includes
relocation table, type arena, etc. It is now the caller's
responsibility to deinit the state (so that no memory is leaked)
after `Decl` has been analysed (or errored out). The caller here
is typically a linker such as `Elf` or `MachO`.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions
