mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
codegen: actually write out padding for packed structs upfront
This commit is contained in:
parent
c5a5b420dc
commit
e599ed4a5f
@ -517,7 +517,7 @@ pub fn generateSymbol(
|
||||
const abi_size = math.cast(usize, typed_value.ty.abiSize(mod)) orelse
|
||||
return error.Overflow;
|
||||
const current_pos = code.items.len;
|
||||
try code.resize(current_pos + abi_size);
|
||||
try code.writer().writeByteNTimes(0, abi_size);
|
||||
var bits: u16 = 0;
|
||||
|
||||
for (struct_type.field_types.get(ip), 0..) |field_ty, index| {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user