if (Ty->isPointerTy())
return getTypeSizeInBits(Ty);
- Type *EleTy = cast<VectorType>(Ty)->getElementType();
- return getTypeSizeInBits(EleTy);
+ return getTypeSizeInBits(Ty->getScalarType());
}
/*!
return 0;
}
+unsigned DataLayout::getLargestLegalIntTypeSize() const {
+ unsigned MaxWidth = 0;
+ for (unsigned i = 0, e = (unsigned)LegalIntWidths.size(); i != e; ++i)
+ MaxWidth = std::max<unsigned>(MaxWidth, LegalIntWidths[i]);
+ return MaxWidth;
+}
+
uint64_t DataLayout::getIndexedOffset(Type *ptrTy,
ArrayRef<Value *> Indices) const {
Type *Ty = ptrTy;