projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf00631
)
Add a missing assertion that would have helped out Reid
author
Chris Lattner
<sabre@nondot.org>
Sat, 10 Jun 2006 04:16:23 +0000
(
04:16
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 10 Jun 2006 04:16:23 +0000
(
04:16
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28746
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Constants.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Constants.cpp
b/lib/VMCore/Constants.cpp
index 3351385d0a9fa027cf7b80bccabb0f1e0b54e6bc..3b55b652c093dd63b7ea721e88dc3bc8f9acf896 100644
(file)
--- 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);
}