summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Instructions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index d58877ef773..841cc5926a9 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/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
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud