projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3eff89b
)
Add an assertion for a common error
author
Chris Lattner
<sabre@nondot.org>
Wed, 10 May 2006 04:32:43 +0000
(
04:32
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Wed, 10 May 2006 04:32:43 +0000
(
04:32
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28210
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/Instructions.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/Instructions.cpp
b/lib/VMCore/Instructions.cpp
index d3c7b54d2a8e98640ae021a0c90d173b1739c405..929e1409281e42ba9e258e0d5321f83675415d44 100644
(file)
--- a/
lib/VMCore/Instructions.cpp
+++ b/
lib/VMCore/Instructions.cpp
@@
-505,9
+505,12
@@
void BranchInst::setSuccessorV(unsigned idx, BasicBlock *B) {
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;
}