mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Fixed crepr union size
This commit is contained in:
parent
682798fe7e
commit
868700b0dd
5 changed files with 15 additions and 35 deletions
|
@ -4859,8 +4859,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
}
|
||||
}
|
||||
|
||||
//bool needsExplicitAlignment = !isCRepr || ((typeInstance->mBaseType != NULL) && (!typeInstance->mBaseType->mIsCRepr));
|
||||
|
||||
bool needsExplicitAlignment = true;
|
||||
|
||||
for (int fieldIdx = 0; fieldIdx < (int)dataFieldVec.size(); fieldIdx++)
|
||||
|
@ -4873,8 +4871,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
int alignSize = fieldInstance->GetAlign(packing);
|
||||
fieldInstance->mDataSize = dataSize;
|
||||
|
||||
//bool needsExplicitAlignment = !isCRepr || resolvedFieldType->NeedsExplicitAlignment();
|
||||
|
||||
int nextDataPos = dataPos;
|
||||
nextDataPos = (dataPos + (alignSize - 1)) & ~(alignSize - 1);
|
||||
int padding = nextDataPos - dataPos;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue