1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

IntegerType is a sized DerivedType too.

llvm-svn: 33521
This commit is contained in:
Reid Spencer 2007-01-26 07:51:36 +00:00
parent 641bcdce55
commit 93b5ba7cd2

View File

@ -139,6 +139,9 @@ unsigned Type::getPrimitiveSizeInBits() const {
/// iff all of the members of the type are sized as well. Since asking for
/// their size is relatively uncommon, move this operation out of line.
bool Type::isSizedDerivedType() const {
if (isa<IntegerType>(this))
return true;
if (const ArrayType *ATy = dyn_cast<ArrayType>(this))
return ATy->getElementType()->isSized();