diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-04-23 11:04:22 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-04-23 11:04:22 +0100 |
| commit | c2fa79012ea01ad508083f13f86d2b6c8f5045da (patch) | |
| tree | 9f641abba170fe6f78e183842834913ddcdea993 /src/ssa.c | |
| parent | 3fd37c6dc5da53fd02214214aa4993f02e6bdc83 (diff) | |
Fix `find_using_index_expr`
Diffstat (limited to 'src/ssa.c')
| -rw-r--r-- | src/ssa.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -700,7 +700,7 @@ ssaValue *ssa_addr_load(ssaProc *p, ssaAddr addr) { } ssaValue *ssa_get_using_variable(ssaProc *p, Entity *e) { - GB_ASSERT(e->kind == Entity_Variable && e->flags & EntityFlag_Anonymous); + GB_ASSERT(e->kind == Entity_Variable && e->flags & EntityFlag_Using); String name = e->token.string; Entity *parent = e->using_parent; Selection sel = lookup_field(p->allocator, parent->type, name, false); @@ -724,7 +724,7 @@ ssaAddr ssa_build_addr_from_entity(ssaProc *p, Entity *e, AstNode *expr) { ssaValue **found = map_ssa_value_get(&p->module->values, hash_pointer(e)); if (found) { v = *found; - } else if (e->kind == Entity_Variable && e->flags & EntityFlag_Anonymous) { + } else if (e->kind == Entity_Variable && e->flags & EntityFlag_Using) { // NOTE(bill): Calculate the using variable every time v = ssa_get_using_variable(p, e); } |