Add sanity check in lb_create_procedure

This commit is contained in:
gingerBill
2021-08-03 13:49:01 +01:00
parent 67bedcba4b
commit 3a8ac92995
+3
View File
@@ -2741,6 +2741,9 @@ void lb_ensure_abi_function_type(lbModule *m, lbProcedure *p) {
lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body) { lbProcedure *lb_create_procedure(lbModule *m, Entity *entity, bool ignore_body) {
GB_ASSERT(entity != nullptr); GB_ASSERT(entity != nullptr);
GB_ASSERT(entity->kind == Entity_Procedure); GB_ASSERT(entity->kind == Entity_Procedure);
if (!entity->Procedure.is_foreign) {
GB_ASSERT(entity->flags |= EntityFlag_ProcBodyChecked);
}
String link_name = {}; String link_name = {};