Skip to content

Commit

Permalink
7903463: jextract generates empty padding layouts
Browse files Browse the repository at this point in the history
Reviewed-by: jvernee
  • Loading branch information
mcimadamore committed May 2, 2023
1 parent f3c7c85 commit 9feb042
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -155,7 +155,9 @@ private void handleBitfields() {
if (!prevBitfieldDecls.isEmpty()) {
addField(offset, bitfield(prevBitfieldDecls.toArray(new Declaration.Variable[0])));
}
fieldLayouts.add(MemoryLayout.paddingLayout(prevBitfieldSize));
if (prevBitfieldSize > 0) {
fieldLayouts.add(MemoryLayout.paddingLayout(prevBitfieldSize));
}
}
}
}

0 comments on commit 9feb042

Please sign in to comment.