mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 01:44:36 +00:00
Fix compound literal printing for structs with custom alignment requirements
This commit is contained in:
@@ -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(", "));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user