Skip to content

Commit f043528

Browse files
committed
dwarves_reorganize: Fix class__demote_bitfields, we need power of two bytes
There is no such thing as a 3 bytes sized base type. Round it up to 4. Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent dffd3d4 commit f043528

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

dwarves_reorganize.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,7 @@ static int class__demote_bitfields(struct class *class, const struct cu *cu,
533533

534534
size = member->byte_size;
535535
bytes_needed = (current_bitfield_size + 7) / 8;
536+
bytes_needed = roundup(bytes_needed, 2);
536537
if (bytes_needed == size)
537538
continue;
538539

0 commit comments

Comments
 (0)