diff options
| author | gingerBill <bill@gingerbill.org> | 2019-05-04 13:02:15 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-05-04 13:02:15 +0100 |
| commit | a46a1f5f34d281ecede1b446fea7be8834496da5 (patch) | |
| tree | badacc472ce50c6ee0fda26fdee4e6b521af0455 /src/ir_print.cpp | |
| parent | 40135cbc667b5991e00ff7d9fc2d638f94b9fb9b (diff) | |
Minor change to bit_field assignment rules
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 84a2eddc8..fb3da8f69 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -558,9 +558,9 @@ void ir_print_type(irFileBuffer *f, irModule *m, Type *t, bool in_struct) { case Type_BitField: { i64 align = type_align_of(t); i64 size = type_size_of(t); - ir_write_byte(f, '{'); + ir_write_string(f, str_lit("<{")); ir_print_alignment_prefix_hack(f, align); - ir_fprintf(f, ", [%lld x i8]}", size); + ir_fprintf(f, ", [%lld x i8]}>", size); break; } @@ -1190,7 +1190,11 @@ void ir_print_instr(irFileBuffer *f, irModule *m, irValue *value) { ir_print_type(f, m, type); ir_write_str_lit(f, "* "); ir_print_value(f, m, instr->Load.address, type); - ir_fprintf(f, ", align %lld", type_align_of(type)); + if (instr->Load.custom_align > 0) { + ir_fprintf(f, ", align %lld", instr->Load.custom_align); + } else { + ir_fprintf(f, ", align %lld", type_align_of(type)); + } ir_print_debug_location(f, m, value); break; } |