Skip to content

Commit f772159

Browse files
committed
Just retry again with lb_generate_missing_procedures
1 parent 9b788b9 commit f772159

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/llvm_backend.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,6 +2553,8 @@ gb_internal WORKER_TASK_PROC(lb_generate_missing_procedures_to_check_worker_proc
25532553
}
25542554

25552555
gb_internal void lb_generate_missing_procedures(lbGenerator *gen, bool do_threading) {
2556+
isize retry_count = 0;
2557+
retry:;
25562558
if (do_threading) {
25572559
for (auto const &entry : gen->modules) {
25582560
lbModule *m = entry.value;
@@ -2570,6 +2572,14 @@ gb_internal void lb_generate_missing_procedures(lbGenerator *gen, bool do_thread
25702572

25712573
for (auto const &entry : gen->modules) {
25722574
lbModule *m = entry.value;
2575+
if (m->missing_procedures_to_check.count != 0) {
2576+
if (retry_count > gen->modules.count) {
2577+
GB_ASSERT(m->missing_procedures_to_check.count == 0);
2578+
}
2579+
2580+
retry_count += 1;
2581+
goto retry;
2582+
}
25732583
GB_ASSERT(m->missing_procedures_to_check.count == 0);
25742584
GB_ASSERT(m->procedures_to_generate.count == 0);
25752585
}

0 commit comments

Comments
 (0)