summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-03-21 23:01:03 +0000
committerBill Wendling <isanbard@gmail.com>2013-03-21 23:01:03 +0000
commitd254ab229820f1e6a98b44329974acb968a761b7 (patch)
treedd5a0028b42ead45d24e92582d2f8e2ab673ab5a /llvm/lib/IR
parent0d7d62e4b244d185cb84c9a3a6c8cab06c0973b4 (diff)
downloadbcm5719-llvm-d254ab229820f1e6a98b44329974acb968a761b7.tar.gz
bcm5719-llvm-d254ab229820f1e6a98b44329974acb968a761b7.zip
Add a query to tell if a landing pad has a catch-all.
llvm-svn: 177675
Diffstat (limited to 'llvm/lib/IR')
-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