diff options
| author | gingerBill <bill@gingerbill.org> | 2019-08-13 22:33:05 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2019-08-13 22:33:05 +0100 |
| commit | 0076a4df62c5f4e2fc827d6401ae4c8a93181fb9 (patch) | |
| tree | fa533ce3bd986c94edc2789a17391f96bedc71be /src/ir_print.cpp | |
| parent | 4c065a7e99a97ee8c4f527503b0daad4dd5f2454 (diff) | |
Fix compound literal printing for structs with custom alignment requirements
Diffstat (limited to 'src/ir_print.cpp')
| -rw-r--r-- | src/ir_print.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 684ae81cd..c1e41c4b0 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -943,7 +943,8 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * if (type->Struct.is_packed) ir_write_byte(f, '<'); ir_write_byte(f, '{'); if (type->Struct.custom_align > 0) { - ir_fprintf(f, "[0 x <%lld x i8>] zeroinitializer", cast(i64)type->Struct.custom_align); + ir_print_alignment_prefix_hack(f, cast(i64)type->Struct.custom_align); + ir_write_str_lit(f, " zeroinitializer"); if (value_count > 0) { ir_write_string(f, str_lit(", ")); } |