mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-04 21:30:49 +00:00
Check that catch clauses have pointer type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140625 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
332850d8cc
commit
040bff0bc2
@ -1455,9 +1455,14 @@ void Verifier::visitLandingPadInst(LandingPadInst &LPI) {
|
||||
for (unsigned i = 0, e = LPI.getNumClauses(); i < e; ++i) {
|
||||
Value *Clause = LPI.getClause(i);
|
||||
Assert1(isa<Constant>(Clause), "Clause is not constant!", &LPI);
|
||||
if (LPI.isFilter(i))
|
||||
if (LPI.isCatch(i)) {
|
||||
Assert1(isa<PointerType>(Clause->getType()),
|
||||
"Catch operand does not have pointer type!", &LPI);
|
||||
} else {
|
||||
Assert1(LPI.isFilter(i), "Clause is neither catch nor filter!", &LPI);
|
||||
Assert1(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
|
||||
"Filter is not an array of constants!", &LPI);
|
||||
"Filter operand is not an array of constants!", &LPI);
|
||||
}
|
||||
}
|
||||
|
||||
visitInstruction(LPI);
|
||||
|
Loading…
Reference in New Issue
Block a user