Only add packing if the padding is non-zero for a #raw_union constant
This commit is contained in:
1 parent
e511f07d76
commit
89645921e2
1 file changed
+1
-1
@@ -1513,7 +1513,7 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
|
|||||||
values[value_count++] = LLVMConstNull(padding_type);
|
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};
|
return {res, original_type};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user