From ad4866653a05a2850d60616b6d7458d4718a2c83 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Wed, 7 May 2025 14:38:40 +0200 Subject: fix disposing builder when not created Fixes #5128 p->builder is created in lb_begin_procedure_body, but that isn't called if there is no body, and we were still calling dispose at that point. Moved it into lb_end_procedure_body to match. --- src/llvm_backend.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'src/llvm_backend.cpp') diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 2f861573a..fd10cd5c1 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -2185,7 +2185,6 @@ gb_internal void lb_generate_procedure(lbModule *m, lbProcedure *p) { p->is_done = true; m->curr_procedure = nullptr; } - lb_end_procedure(p); // Add Flags if (p->entity && p->entity->kind == Entity_Procedure && p->entity->Procedure.is_memcpy_like) { -- cgit v1.2.3