mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
Have the verifier check that all landingpad operands are constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140606 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1449,6 +1449,17 @@ void Verifier::visitLandingPadInst(LandingPadInst &LPI) {
|
|||||||
"Personality function doesn't match others in function", &LPI);
|
"Personality function doesn't match others in function", &LPI);
|
||||||
PersonalityFn = LPI.getPersonalityFn();
|
PersonalityFn = LPI.getPersonalityFn();
|
||||||
|
|
||||||
|
// All operands must be constants.
|
||||||
|
Assert1(isa<Constant>(PersonalityFn), "Personality function is not constant!",
|
||||||
|
&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))
|
||||||
|
Assert1(isa<ConstantArray>(Clause) || isa<ConstantAggregateZero>(Clause),
|
||||||
|
"Filter is not an array of constants!", &LPI);
|
||||||
|
}
|
||||||
|
|
||||||
visitInstruction(LPI);
|
visitInstruction(LPI);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user