From 70c7d03d1cb26d9d1ca506d78383a6f90e3e838c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 27 Jul 2004 07:30:02 +0000 Subject: [PATCH] alloca void makes no sense git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15262 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/iMemory.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp index 6e6d0e5f2cd..3fd02829e04 100644 --- a/lib/VMCore/iMemory.cpp +++ b/lib/VMCore/iMemory.cpp @@ -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); -- 2.34.1