aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-03-27 17:59:01 +0000
committergingerBill <bill@gingerbill.org>2021-03-27 17:59:01 +0000
commit8239cd34ebd1e44456cfa2d06c63f5be7c3b1acd (patch)
tree6aa44cd59b87e99395d7103e40448fe908be46e9 /src/ir.cpp
parent818942b72ec3687ca412da6601a7f233547db4d3 (diff)
Issue #823 - Change semantics of `disabled` attribute to not evaluate any of the parameters at run time
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index ee463296a..96595c38d 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -7765,6 +7765,13 @@ irValue *ir_build_call_expr(irProcedure *proc, Ast *expr) {
}
}
+ Entity *proc_entity = entity_of_node(proc_expr);
+ if (proc_entity != nullptr) {
+ if (proc_entity->flags & EntityFlag_Disabled) {
+ return nullptr;
+ }
+ }
+
if (value == nullptr) {
value = ir_build_expr(proc, proc_expr);
}