mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-02 18:58:15 +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;
|
||||
|
||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
|
||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits,
|
||||
Context.Target.getCharAlign()));
|
||||
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
||||
}
|
||||
|
||||
@ -1378,7 +1379,8 @@ void RecordLayoutBuilder::LayoutBitField(const FieldDecl *D) {
|
||||
} else {
|
||||
uint64_t NewSizeInBits = FieldOffset + FieldSize;
|
||||
|
||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits, 8));
|
||||
setDataSize(llvm::RoundUpToAlignment(NewSizeInBits,
|
||||
Context.Target.getCharAlign()));
|
||||
UnfilledBitsInLastByte = getDataSizeInBits() - NewSizeInBits;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user