diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 3351385d0a9..3b55b652c09 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -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); } |

