[llvm-commits] [llvm] r137511 - /llvm/trunk/lib/AsmParser/LLParser.cpp
Bill Wendling
isanbard at gmail.com
Fri Aug 12 13:52:25 PDT 2011
Author: void
Date: Fri Aug 12 15:52:25 2011
New Revision: 137511
URL: http://llvm.org/viewvc/llvm-project?rev=137511&view=rev
Log:
Add checks for the landingpad instruction's clause values to make sure that
they're the correct type.
Modified:
llvm/trunk/lib/AsmParser/LLParser.cpp
Modified: llvm/trunk/lib/AsmParser/LLParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/AsmParser/LLParser.cpp?rev=137511&r1=137510&r2=137511&view=diff
==============================================================================
--- llvm/trunk/lib/AsmParser/LLParser.cpp (original)
+++ llvm/trunk/lib/AsmParser/LLParser.cpp Fri Aug 12 15:52:25 2011
@@ -3554,6 +3554,16 @@
return true;
}
+ // A 'catch' type expects a non-array constant. A filter clause expects an
+ // array constant.
+ if (CT == LandingPadInst::Catch) {
+ if (isa<ArrayType>(V->getType()))
+ Error(VLoc, "'catch' clause has an invalid type");
+ } else {
+ if (!isa<ArrayType>(V->getType()))
+ Error(VLoc, "'filter' clause has an invalid type");
+ }
+
LP->addClause(V);
}
More information about the llvm-commits
mailing list