Explorar el Código

Merge pull request #5131 from laytan/fix-builder-dispose

fix disposing builder when not created
gingerBill hace 4 meses
padre
commit
4a709086a4
Se han modificado 3 ficheros con 1 adiciones y 4 borrados
  1. 0 1
      src/llvm_backend.cpp
  2. 0 1
      src/llvm_backend.hpp
  3. 1 2
      src/llvm_backend_proc.cpp

+ 0 - 1
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) {

+ 0 - 1
src/llvm_backend.hpp

@@ -409,7 +409,6 @@ gb_internal LLVMAttributeRef lb_create_enum_attribute_with_type(LLVMContextRef c
 gb_internal void lb_add_proc_attribute_at_index(lbProcedure *p, isize index, char const *name, u64 value);
 gb_internal void lb_add_proc_attribute_at_index(lbProcedure *p, isize index, char const *name);
 gb_internal lbProcedure *lb_create_procedure(lbModule *module, Entity *entity, bool ignore_body=false);
-gb_internal void lb_end_procedure(lbProcedure *p);
 
 
 gb_internal LLVMTypeRef lb_type(lbModule *m, Type *type);

+ 1 - 2
src/llvm_backend_proc.cpp

@@ -783,8 +783,7 @@ gb_internal void lb_end_procedure_body(lbProcedure *p) {
 
 	p->curr_block = nullptr;
 	p->state_flags = 0;
-}
-gb_internal void lb_end_procedure(lbProcedure *p) {
+
 	LLVMDisposeBuilder(p->builder);
 }