mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 03:23:01 +02:00
Initial support for packed types, contributed by Morten Ofstad
llvm-svn: 18406
This commit is contained in:
parent
e4350af487
commit
a94cee5109
@ -175,6 +175,13 @@ static inline void getTypeInfo(const Type *Ty, const TargetData *TD,
|
||||
Size = AlignedSize*ATy->getNumElements();
|
||||
return;
|
||||
}
|
||||
case Type::PackedTyID: {
|
||||
const PackedType *PTy = cast<PackedType>(Ty);
|
||||
getTypeInfo(PTy->getElementType(), TD, Size, Alignment);
|
||||
unsigned AlignedSize = (Size + Alignment - 1)/Alignment*Alignment;
|
||||
Size = AlignedSize*PTy->getNumElements();
|
||||
return;
|
||||
}
|
||||
case Type::StructTyID: {
|
||||
// Get the layout annotation... which is lazily created on demand.
|
||||
const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
|
||||
|
Loading…
Reference in New Issue
Block a user