Only add packing if the padding is non-zero for a #raw_union constant

This commit is contained in:
gingerBill
2025-09-29 11:00:08 +01:00
parent e511f07d76
commit 89645921e2
+1 -1
View File
@@ -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};
}