aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-05-28 16:11:19 +0100
committerGinger Bill <bill@gingerbill.org>2017-05-28 16:11:19 +0100
commitf4924e39d487f95bbfbfbc83dd0ae237923505ae (patch)
tree73c226998759287499fcba386fd2ac9556d21213 /src
parent826e05c96e1e32399c9ce168b50a66fca35a9bd1 (diff)
Fix printing of struct literals with custom alignment
Diffstat (limited to 'src')
-rw-r--r--src/ir_print.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ir_print.c b/src/ir_print.c
index f016bd887..b38769e32 100644
--- a/src/ir_print.c
+++ b/src/ir_print.c
@@ -601,6 +601,12 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type *
ir_fprintf(f, "<");
}
ir_fprintf(f, "{");
+ if (type->Record.custom_align > 0) {
+ ir_fprintf(f, "[0 x <%lld x i8>] zeroinitializer", cast(i64)type->Record.custom_align);
+ if (value_count > 0) {
+ ir_fprintf(f, ", ");
+ }
+ }
for (isize i = 0; i < value_count; i++) {