mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-18 03:42:23 -07:00
Only add packing if the padding is non-zero for a #raw_union constant
This commit is contained in:
@@ -1513,7 +1513,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
|
||||
values[value_count++] = LLVMConstNull(padding_type);
|
||||
}
|
||||
|
||||
LLVMValueRef res = LLVMConstStructInContext(m->ctx, values, value_count, true);
|
||||
LLVMValueRef res = LLVMConstStructInContext(m->ctx, values, value_count, /*packed*/padding > 0);
|
||||
|
||||
return {res, original_type};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user