summaryrefslogtreecommitdiff
path: root/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/IR/Instructions.cpp')
-rw-r--r--lib/IR/Instructions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp
index d58877ef77..841cc5926a 100644
--- a/lib/IR/Instructions.cpp
+++ b/lib/IR/Instructions.cpp
@@ -256,6 +256,13 @@ void LandingPadInst::addClause(Value *Val) {
OperandList[OpNo] = Val;
}
+bool LandingPadInst::hasCatchAll() const {
+ for (unsigned I = 0, E = getNumClauses(); I != E; ++I)
+ if (isCatch(I) && isa<ConstantPointerNull>(getClause(I)))
+ return true;
+ return false;
+}
+
//===----------------------------------------------------------------------===//
// CallInst Implementation
//===----------------------------------------------------------------------===//