diff options
Diffstat (limited to 'src/analyze.cpp')
| -rw-r--r-- | src/analyze.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/analyze.cpp b/src/analyze.cpp index 144d50a70c..c7f6989423 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -2924,3 +2924,12 @@ void ensure_complete_type(CodeGen *g, TypeTableEntry *type_entry) { resolve_union_type(g, type_entry); } } + +bool ir_get_var_is_comptime(VariableTableEntry *var) { + if (!var->is_comptime) + return false; + if (var->is_comptime->other) + return var->is_comptime->other->static_value.data.x_bool; + return var->is_comptime->static_value.data.x_bool; +} + |
