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 695ab7174f
commit d63a5200cb
1 changed files with 4 additions and 0 deletions

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");
}