diff options
| author | gingerBill <bill@gingerbill.org> | 2019-12-29 21:10:27 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-12-29 21:10:27 +0000 |
| commit | 2252d992d79a39c0c9d1ad0eeb312b6e75195f8f (patch) | |
| tree | 56e95fca5a4b83d0132eb3f38f434908395d2d96 /src/ir.cpp | |
| parent | 2d70a784d16c5fa10f830e12c138f275ae5bb018 (diff) | |
Add `-disable-assert` to disable the code generation of the built-in run-time 'assert' procedure
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 3be207e3e..dd9ba73cc 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -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); |