mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-24 14:45:00 -07:00
debug info fixes/refactor
This fixes (on my end) #3340, #3117, #2945, #2922, and #2762 A general refactor of debug info generation in order to fix issues and increase stability. What I believe is the root cause of a bunch of issues is that we use the temporary metadata/forward declarations too much (/ hold onto them for too long). It seems to cause problems with the reference counting inside LLVM. This PR reduces the use of these forward declarations to a minimum, it creates it, fills in the fields, and resolves it, instead of waiting until the end of generating code. Some smaller issues I came across have also been solved.
This commit is contained in:
@@ -1975,12 +1975,6 @@ gb_internal void lb_generate_missing_procedures(lbGenerator *gen, bool do_thread
|
||||
}
|
||||
|
||||
gb_internal void lb_debug_info_complete_types_and_finalize(lbGenerator *gen) {
|
||||
for (auto const &entry : gen->modules) {
|
||||
lbModule *m = entry.value;
|
||||
if (m->debug_builder != nullptr) {
|
||||
lb_debug_complete_types(m);
|
||||
}
|
||||
}
|
||||
for (auto const &entry : gen->modules) {
|
||||
lbModule *m = entry.value;
|
||||
if (m->debug_builder != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user