aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-06-10 04:16:23 +0000
committerChris Lattner <sabre@nondot.org>2006-06-10 04:16:23 +0000
commit31d1a2c51c4dfcd1cb7a8036f195fb717b6b7327 (patch)
tree41ad34b126b85942679d436f48f0e80e5ba52b22 /lib
parentcf0063171995c97ee52dfdf5d6bbbe090d2f5f03 (diff)
Add a missing assertion that would have helped out Reid
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Constants.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp
index 3351385d0a..3b55b652c0 100644
--- a/lib/VMCore/Constants.cpp
+++ b/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);
}