mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-03 19:32:35 +00:00
Instead of round up sizes to '8', round them up to the alignment of the char
type. llvm-svn: 127391
This commit is contained in:
parent
e73807538a
commit
a1a2e8decb
@ -1301,7 +1301,8 @@ void RecordLayoutBuilder::LayoutWideBitField(uint64_t FieldSize,
|
|||||||
|
|
||||||
uint64_t NewSizeInBits = FieldOffset + FieldSize;
|
uint64_t NewSizeInBits = FieldOffset + FieldSize;
|
||||||
|
|
||||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
|
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits,
|
||||||
|
Context.Target.getCharAlign()));
|
||||||
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1378,7 +1379,8 @@ void RecordLayoutBuilder::LayoutBitField(const FieldDecl *D) {
|
|||||||
} else {
|
} else {
|
||||||
uint64_t NewSizeInBits = FieldOffset + FieldSize;
|
uint64_t NewSizeInBits = FieldOffset + FieldSize;
|
||||||
|
|
||||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
|
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits,
|
||||||
|
Context.Target.getCharAlign()));
|
||||||
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user