aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 7c1d6d343..66d0f3ee4 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -8173,9 +8173,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++;
@@ -8285,11 +8284,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) {