[llvm-commits] CVS: llvm/lib/VMCore/iMemory.cpp

Chris Lattner lattner at cs.uiuc.edu
Tue Jul 27 00:30:13 PDT 2004



Changes in directory llvm/lib/VMCore:

iMemory.cpp updated: 1.42 -> 1.43

---
Log message:

alloca void makes no sense


---
Diffs of the changes:  (+1 -0)

Index: llvm/lib/VMCore/iMemory.cpp
diff -u llvm/lib/VMCore/iMemory.cpp:1.42 llvm/lib/VMCore/iMemory.cpp:1.43
--- llvm/lib/VMCore/iMemory.cpp:1.42	Wed Jul 14 13:14:33 2004
+++ llvm/lib/VMCore/iMemory.cpp	Tue Jul 27 02:30:02 2004
@@ -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);
 





More information about the llvm-commits mailing list