Changes in directory llvm/lib/VMCore:

Instructions.cpp updated: 1.36 -> 1.37
---
Log message:

Add an assertion for a common error


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

 Instructions.cpp |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.36 
llvm/lib/VMCore/Instructions.cpp:1.37
--- llvm/lib/VMCore/Instructions.cpp:1.36       Tue May  2 19:48:22 2006
+++ llvm/lib/VMCore/Instructions.cpp    Tue May  9 23:32:43 2006
@@ -505,9 +505,12 @@
 static Value *getAISize(Value *Amt) {
   if (!Amt)
     Amt = ConstantUInt::get(Type::UIntTy, 1);
-  else
+  else {
+    assert(!isa<BasicBlock>(Amt) &&
+           "Passed basic block into allocation size parameter!  Ue other 
ctor");
     assert(Amt->getType() == Type::UIntTy &&
            "Malloc/Allocation array size != UIntTy!");
+  }
   return Amt;
 }
 



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to