mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
consistency
llvm-svn: 60694
This commit is contained in:
parent
6ab4673c40
commit
9020891916
@ -51,7 +51,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) {
|
|||||||
unsigned TyAlign = ST->isPacked() ? 1 : TD.getABITypeAlignment(Ty);
|
unsigned TyAlign = ST->isPacked() ? 1 : TD.getABITypeAlignment(Ty);
|
||||||
|
|
||||||
// Add padding if necessary to align the data element properly.
|
// Add padding if necessary to align the data element properly.
|
||||||
if (StructSize & TyAlign-1)
|
if ((StructSize & TyAlign-1) != 0)
|
||||||
StructSize = TargetData::RoundUpAlignment(StructSize, TyAlign);
|
StructSize = TargetData::RoundUpAlignment(StructSize, TyAlign);
|
||||||
|
|
||||||
// Keep track of maximum alignment constraint.
|
// Keep track of maximum alignment constraint.
|
||||||
@ -66,7 +66,7 @@ StructLayout::StructLayout(const StructType *ST, const TargetData &TD) {
|
|||||||
|
|
||||||
// Add padding to the end of the struct so that it could be put in an array
|
// Add padding to the end of the struct so that it could be put in an array
|
||||||
// and all array elements would be aligned correctly.
|
// and all array elements would be aligned correctly.
|
||||||
if (StructSize & (StructAlignment-1) != 0)
|
if ((StructSize & (StructAlignment-1)) != 0)
|
||||||
StructSize = TargetData::RoundUpAlignment(StructSize, StructAlignment);
|
StructSize = TargetData::RoundUpAlignment(StructSize, StructAlignment);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user