diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-12 20:23:36 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-12 20:23:36 +0000 |
| commit | 054e24103329022b1d918505cc5a61f8540c0e13 (patch) | |
| tree | 08e98ddd2d162cc0d4a99c11e8f6a67569a7a142 /src/ir.cpp | |
| parent | f7e9649be466ea03f556e2918063c5a4d0d28e2e (diff) | |
Localize checker data
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 25e21ad2e..100beee4d 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8171,9 +8171,8 @@ void ir_gen_tree(irGen *s) { bool has_dll_main = false; bool has_win_main = false; - for_array(i, info->entities.entries) { - auto *entry = &info->entities.entries[i]; - Entity *e = cast(Entity *)entry->key.ptr; + for_array(i, info->entities) { + Entity *e = info->entities[i]; String name = e->token.string; if (e->kind == Entity_Variable) { global_variable_max_count++; @@ -8283,11 +8282,10 @@ void ir_gen_tree(irGen *s) { } } - for_array(i, info->entities.entries) { - auto * entry = &info->entities.entries[i]; - Entity * e = cast(Entity *)entry->key.ptr; + for_array(i, info->entities) { + Entity * e = info->entities[i]; String name = e->token.string; - DeclInfo *decl = entry->value; + DeclInfo *decl = e->decl_info; Scope * scope = e->scope; if (!scope->is_file) { |