[llvm-commits] CVS: llvm/lib/VMCore/Constants.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jun 9 21:16:59 PDT 2006
Changes in directory llvm/lib/VMCore:
Constants.cpp updated: 1.153 -> 1.154
---
Log message:
Add a missing assertion that would have helped out Reid
---
Diffs of the changes: (+2 -0)
Constants.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.153 llvm/lib/VMCore/Constants.cpp:1.154
--- llvm/lib/VMCore/Constants.cpp:1.153 Tue May 30 13:15:07 2006
+++ llvm/lib/VMCore/Constants.cpp Fri Jun 9 23:16:23 2006
@@ -863,6 +863,8 @@
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);
}
More information about the llvm-commits
mailing list