mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-21 12:38:45 +00:00
Initial support for packed types, contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f71755dc56
commit
527efc6742
@ -175,6 +175,13 @@ static inline void getTypeInfo(const Type *Ty, const TargetData *TD,
|
|||||||
Size = AlignedSize*ATy->getNumElements();
|
Size = AlignedSize*ATy->getNumElements();
|
||||||
return;
|
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: {
|
case Type::StructTyID: {
|
||||||
// Get the layout annotation... which is lazily created on demand.
|
// Get the layout annotation... which is lazily created on demand.
|
||||||
const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
|
const StructLayout *Layout = TD->getStructLayout(cast<StructType>(Ty));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user