diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-07-20 15:32:34 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-07-20 15:32:34 +0100 |
| commit | 13bc6eeea4cc89b06bcfc3aaef7bfb85c1cb5b01 (patch) | |
| tree | 1d359e2f6b6f72c2f37b4262955e932718dfe312 /src/ir_print.cpp | |
| parent | 2da18b6d3323454d2c820dac8d17875f8b48f914 (diff) | |
Make `fields` et al an Array rather than a raw pointer
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 86af71f54..78090e6ac 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -314,11 +314,11 @@ void ir_print_type(irFileBuffer *f, irModule *m, Type *t) { ir_fprintf(f, "{"); if (t->Struct.custom_align > 0) { ir_fprintf(f, "[0 x <%lld x i8>]", t->Struct.custom_align); - if (t->Struct.field_count > 0) { + if (t->Struct.fields.count > 0) { ir_fprintf(f, ", "); } } - for (isize i = 0; i < t->Struct.field_count; i++) { + for_array(i, t->Struct.fields) { if (i > 0) { ir_fprintf(f, ", "); } @@ -585,7 +585,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * } - isize value_count = type->Struct.field_count; + isize value_count = type->Struct.fields.count; ExactValue *values = gb_alloc_array(m->tmp_allocator, ExactValue, value_count); bool *visited = gb_alloc_array(m->tmp_allocator, bool, value_count); @@ -670,7 +670,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * ir_fprintf(f, "zeroinitializer"); } else { if (is_type_struct(type)) { - i32 value_count = type->Struct.field_count; + i32 value_count = type->Struct.fields.count; if (type->Struct.is_packed) ir_fprintf(f, "<"); ir_fprintf(f, "{"); if (type->Struct.custom_align > 0) { |