From: Chris Lattner Date: Fri, 7 Sep 2001 16:25:42 +0000 (+0000) Subject: Add assertion to check for X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=118630d9248415d8139d7df4147649bdadacbae9;p=oota-llvm.git 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 --- diff --git a/include/llvm/iMemory.h b/include/llvm/iMemory.h index 5062cb61af4..5667da6c8ff 100644 --- a/include/llvm/iMemory.h +++ b/include/llvm/iMemory.h @@ -33,6 +33,11 @@ public: Operands.reserve(1); 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!"); } }