aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2019-08-13 22:33:05 +0100
committergingerBill <bill@gingerbill.org>2019-08-13 22:33:05 +0100
commit0076a4df62c5f4e2fc827d6401ae4c8a93181fb9 (patch)
treefa533ce3bd986c94edc2789a17391f96bedc71be /src
parent4c065a7e99a97ee8c4f527503b0daad4dd5f2454 (diff)
Fix compound literal printing for structs with custom alignment requirements
Diffstat (limited to 'src')
-rw-r--r--src/ir_print.cpp3
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(", "));
}