From 31d1a2c51c4dfcd1cb7a8036f195fb717b6b7327 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 10 Jun 2006 04:16:23 +0000 Subject: [PATCH] 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 --- lib/VMCore/Constants.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 3351385d0a9..3b55b652c09 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -863,6 +863,8 @@ static ValueMap AggZeroConstants; static char getValType(ConstantAggregateZero *CPZ) { return 0; } Constant *ConstantAggregateZero::get(const Type *Ty) { + assert((isa(Ty) || isa(Ty) || isa(Ty)) && + "Cannot create an aggregate zero of non-aggregate type!"); return AggZeroConstants.getOrCreate(Ty, 0); }