[llvm-commits] CVS: llvm/lib/VMCore/Instructions.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue May 9 21:32:55 PDT 2006
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;
}
More information about the llvm-commits
mailing list