aboutsummaryrefslogtreecommitdiff
path: root/src/ssa.c
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-04-23 11:04:22 +0100
committerGinger Bill <bill@gingerbill.org>2017-04-23 11:04:22 +0100
commitc2fa79012ea01ad508083f13f86d2b6c8f5045da (patch)
tree9f641abba170fe6f78e183842834913ddcdea993 /src/ssa.c
parent3fd37c6dc5da53fd02214214aa4993f02e6bdc83 (diff)
Fix `find_using_index_expr`
Diffstat (limited to 'src/ssa.c')
-rw-r--r--src/ssa.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ssa.c b/src/ssa.c
index 6aa3e1d00..2c4394cd3 100644
--- a/src/ssa.c
+++ b/src/ssa.c
@@ -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);
}