mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-12 01:25:10 +00:00
Add an assertion for a common error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -505,9 +505,12 @@ void BranchInst::setSuccessorV(unsigned idx, BasicBlock *B) {
|
|||||||
static Value *getAISize(Value *Amt) {
|
static Value *getAISize(Value *Amt) {
|
||||||
if (!Amt)
|
if (!Amt)
|
||||||
Amt = ConstantUInt::get(Type::UIntTy, 1);
|
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 &&
|
assert(Amt->getType() == Type::UIntTy &&
|
||||||
"Malloc/Allocation array size != UIntTy!");
|
"Malloc/Allocation array size != UIntTy!");
|
||||||
|
}
|
||||||
return Amt;
|
return Amt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user