mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-29 19:00:06 +00:00
Fix compound literal printing for structs with custom alignment requirements
This commit is contained in:
+2
-1
@@ -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, '<');
|
if (type->Struct.is_packed) ir_write_byte(f, '<');
|
||||||
ir_write_byte(f, '{');
|
ir_write_byte(f, '{');
|
||||||
if (type->Struct.custom_align > 0) {
|
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) {
|
if (value_count > 0) {
|
||||||
ir_write_string(f, str_lit(", "));
|
ir_write_string(f, str_lit(", "));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user