From 6aae381e83dddf8808feefe4a5a2470320f27342 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 27 May 2018 11:03:46 +0100 Subject: Move ODIN_* platform constants to `core:os` --- src/ir.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/ir.cpp') 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; -- cgit v1.2.3