diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 594c33588efc..fc58f5774971 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -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(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(Ty));