summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-07-27 07:30:02 +0000
committerChris Lattner <sabre@nondot.org>2004-07-27 07:30:02 +0000
commit89c0c0ae3ff7e4592598c8cc40e2ba6bebfe112e (patch)
treed34154f5a350c779fb4cfc3af1c70ac5d655ba4a /llvm/lib
parent731381dc0efa5399f34469fdec51f7d96e1ec147 (diff)
downloadbcm5719-llvm-89c0c0ae3ff7e4592598c8cc40e2ba6bebfe112e.tar.gz
bcm5719-llvm-89c0c0ae3ff7e4592598c8cc40e2ba6bebfe112e.zip
alloca void makes no sense
llvm-svn: 15262
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/VMCore/iMemory.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/iMemory.cpp b/llvm/lib/VMCore/iMemory.cpp
index 6e6d0e5f2cd..3fd02829e04 100644
--- a/llvm/lib/VMCore/iMemory.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud