diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-02-10 22:02:45 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-02-10 22:02:45 +0000 |
commit | cc5dc2e792852add107cc381b29ebfde19feb77b (patch) | |
tree | f6bb5995548db221a2be8392a7c265b75a7e9bf4 | |
parent | 4e9f579028d06d92fa6d39a25c818a61d2384544 (diff) |
Assert that elements of packed are pointer/float/opaque.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34165 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/Type.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index 34bedbb00a..1f843a275b 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -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"); + } |