diff options
| author | gingerBill <bill@gingerbill.org> | 2018-05-27 11:03:46 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-05-27 11:03:46 +0100 |
| commit | 6aae381e83dddf8808feefe4a5a2470320f27342 (patch) | |
| tree | 4b83602375cb42f89d68c89c60bd1389df93369a /src/ir.cpp | |
| parent | 7ee9051a56ca0c04e6b60f53b9dfe47c75596496 (diff) | |
Move ODIN_* platform constants to `core:os`
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index f20d2cafb..ff364602b 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8257,12 +8257,7 @@ void ir_gen_tree(irGen *s) { Entity *e = info->entities[i]; String name = e->token.string; - bool is_global = false; - if (e->scope->is_package) { - is_global = true; - } else if (e->scope->parent && e->scope->parent->is_package) { - is_global = true; - } + bool is_global = e->package != nullptr; if (e->kind == Entity_Variable) { global_variable_max_count++; @@ -8315,12 +8310,7 @@ void ir_gen_tree(irGen *s) { GB_ASSERT(e->kind == Entity_Variable); - bool is_global = false; - if (e->scope->is_package) { - is_global = true; - } else if (e->scope->parent && e->scope->parent->is_package) { - is_global = true; - } + bool is_global = e->package != nullptr; bool is_foreign = e->Variable.is_foreign; bool is_export = e->Variable.is_export; |