Assert that elements of packed are pointer/float/opaque.

llvm-svn: 34165
This commit is contained in:
Reid Spencer 2007-02-10 22:02:45 +00:00
parent fded2d41c1
commit 8594672a45

View File

@ -426,6 +426,10 @@ PackedType::PackedType(const Type *ElType, unsigned NumEl)
NumElements = NumEl;
setAbstract(ElType->isAbstract());
assert(NumEl > 0 && "NumEl of a PackedType must be greater than 0");
assert((ElType->isInteger() || ElType->isFloatingPoint() ||
isa<OpaqueType>(ElType)) &&
"Elements of a PackedType must be a primitive type");
}