Add -disable-assert to disable the code generation of the built-in run-time 'assert' procedure

This commit is contained in:
gingerBill
2019-12-29 21:10:27 +00:00
parent 2d70a784d1
commit 2252d992d7
8 changed files with 48 additions and 2 deletions
+6
View File
@@ -3109,6 +3109,12 @@ irValue *ir_emit_call(irProcedure *p, irValue *value, Array<irValue *> const &ar
GB_ASSERT(pt->kind == Type_Proc);
Type *results = pt->Proc.results;
if (p->entity != nullptr) {
if (p->entity->flags & EntityFlag_Disabled) {
return nullptr;
}
}
irValue *context_ptr = nullptr;
if (pt->Proc.calling_convention == ProcCC_Odin) {
context_ptr = ir_find_or_generate_context_ptr(p);