Add a missing assertion that would have helped out Reid

llvm-svn: 28746
This commit is contained in:
Chris Lattner 2006-06-10 04:16:23 +00:00
parent b055c8737f
commit bfd0b6d8e4
1 changed files with 2 additions and 0 deletions

View File

@ -863,6 +863,8 @@ static ValueMap<char, Type, ConstantAggregateZero> AggZeroConstants;
static char getValType(ConstantAggregateZero *CPZ) { return 0; }
Constant *ConstantAggregateZero::get(const Type *Ty) {
assert((isa<StructType>(Ty) || isa<ArrayType>(Ty) || isa<PackedType>(Ty)) &&
"Cannot create an aggregate zero of non-aggregate type!");
return AggZeroConstants.getOrCreate(Ty, 0);
}