diff options
| author | gingerBill <bill@gingerbill.org> | 2018-06-17 16:35:22 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2018-06-17 16:35:22 +0100 |
| commit | 4d9d38cc282ab5bb509c54f8ef8c2ba4b607e258 (patch) | |
| tree | 73a350f2a9a77a48e8c369a52db5fdab400e22f7 /src/ir_print.cpp | |
| parent | 5b71ffd4f9e0ea17ccf81ef84800fde7efd32fb9 (diff) | |
Move TypeAndValue to Ast from Map
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index a1982479d..880e9d5ef 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -681,7 +681,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * for (isize i = 0; i < elem_count; i++) { if (i > 0) ir_write_str_lit(f, ", "); - TypeAndValue tav = type_and_value_of_expr(m->info, cl->elems[i]); + TypeAndValue tav = cl->elems[i]->tav; GB_ASSERT(tav.mode != Addressing_Invalid); ir_print_compound_element(f, m, tav.value, elem_type); } @@ -715,7 +715,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * ast_node(fv, FieldValue, cl->elems[i]); String name = fv->field->Ident.token.string; - TypeAndValue tav = type_and_value_of_expr(m->info, fv->value); + TypeAndValue tav = fv->value->tav; GB_ASSERT(tav.mode != Addressing_Invalid); Selection sel = lookup_field(type, name, false); @@ -727,7 +727,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * } else { for_array(i, cl->elems) { Entity *f = type->Struct.fields[i]; - TypeAndValue tav = type_and_value_of_expr(m->info, cl->elems[i]); + TypeAndValue tav = cl->elems[i]->tav; ExactValue val = {}; if (tav.mode != Addressing_Invalid) { val = tav.value; |