Add assertion to check for

alloca [int]
for example


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-09-07 16:25:42 +00:00
parent 9d3e9f93e5
commit 118630d924

View File

@ -33,6 +33,11 @@ public:
Operands.reserve(1); Operands.reserve(1);
Operands.push_back(Use(ArraySize, this)); Operands.push_back(Use(ArraySize, this));
} else {
// Make sure that the pointer is not to an unsized array!
assert(!getType()->getValueType()->isArrayType() ||
((const ArrayType*)getType()->getValueType())->isSized() &&
"Trying to allocate unsized array without size!");
} }
} }