mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-21 04:41:34 +00:00
Check that catch clauses have pointer type.
llvm-svn: 140625
This commit is contained in:
parent
c74cdce7e0
commit
9a75d80f2c
@ -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…
x
Reference in New Issue
Block a user