mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed some alignment differences between LLVM and BeefBE
This commit is contained in:
parent
0ae14f5a5d
commit
1ca01864bb
12 changed files with 73 additions and 21 deletions
|
@ -108,7 +108,10 @@ void BeContext::SetStructBody(BeStructType* structType, const SizedArrayImpl<BeT
|
|||
member.mType = beType;
|
||||
member.mByteOffset = dataPos;
|
||||
dataPos += beType->mSize;
|
||||
structType->mAlign = std::max(structType->mAlign, beType->mAlign);
|
||||
if (packed)
|
||||
structType->mAlign = 1;
|
||||
else
|
||||
structType->mAlign = std::max(structType->mAlign, beType->mAlign);
|
||||
structType->mMembers.push_back(member);
|
||||
}
|
||||
if (!packed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue