[llvm-commits] [llvm] r140625 - /llvm/trunk/lib/VMCore/Verifier.cpp
Duncan Sands
baldrick at free.fr
Tue Sep 27 12:34:22 PDT 2011
Author: baldrick
Date: Tue Sep 27 14:34:22 2011
New Revision: 140625
URL: http://llvm.org/viewvc/llvm-project?rev=140625&view=rev
Log:
Check that catch clauses have pointer type.
Modified:
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=140625&r1=140624&r2=140625&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Tue Sep 27 14:34:22 2011
@@ -1455,9 +1455,14 @@
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);
More information about the llvm-commits
mailing list