alloca void makes no sense
authorChris Lattner <sabre@nondot.org>
Tue, 27 Jul 2004 07:30:02 +0000 (07:30 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 27 Jul 2004 07:30:02 +0000 (07:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15262 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/iMemory.cpp

index 6e6d0e5f2cd93396c95ec3032d4d026e6e096854..3fd02829e0437f58f16fdd1bbb4c385915f742b7 100644 (file)
@@ -17,6 +17,7 @@
 using namespace llvm;
 
 void AllocationInst::init(const Type *Ty, Value *ArraySize, unsigned iTy) {
+  assert(Ty != Type::VoidTy && "Cannot allocate void elements!");
   // ArraySize defaults to 1.
   if (!ArraySize) ArraySize = ConstantUInt::get(Type::UIntTy, 1);