diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-17 22:22:30 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-17 22:22:30 +0100 |
| commit | 877400dd12c47eaaef118fe9658eeb7d829bcf96 (patch) | |
| tree | e31a189750dd8b0f56dc0cecd7a71da1bbc53f84 /src/ir.cpp | |
| parent | a4e3201113311b338c563d169cac59aaf9cf6335 (diff) | |
Scope to use flags rathers than booleans
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 92169f48f..5b97a79d2 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8312,13 +8312,13 @@ void ir_gen_tree(irGen *s) { if (e->kind == Entity_Variable) { global_variable_max_count++; } else if (e->kind == Entity_Procedure && !is_global) { - if (e->scope->is_init && name == "main") { + if ((e->scope->flags&ScopeFlag_Init) && name == "main") { GB_ASSERT(e == entry_point); // entry_point = e; } if (e->Procedure.is_export || (e->Procedure.link_name.len > 0) || - (e->scope->is_file && e->Procedure.link_name.len > 0)) { + ((e->scope->flags&ScopeFlag_File) && e->Procedure.link_name.len > 0)) { if (!has_dll_main && name == "DllMain") { has_dll_main = true; } else if (!has_win_main && name == "WinMain") { @@ -8345,7 +8345,7 @@ void ir_gen_tree(irGen *s) { Entity *e = d->entity; - if (!e->scope->is_file) { + if ((e->scope->flags & ScopeFlag_File) == 0) { continue; } @@ -8400,12 +8400,12 @@ void ir_gen_tree(irGen *s) { DeclInfo *decl = e->decl_info; Scope * scope = e->scope; - if (!scope->is_file) { + if ((scope->flags & ScopeFlag_File) == 0) { continue; } Scope *package_scope = scope->parent; - GB_ASSERT(package_scope->is_pkg); + GB_ASSERT(package_scope->flags & ScopeFlag_Pkg); switch (e->kind) { case Entity_Variable: |