aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/VMCore/iMemory.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/VMCore/iMemory.cpp b/lib/VMCore/iMemory.cpp
index 6e6d0e5f2c..3fd02829e0 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);