diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-03-21 23:01:03 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-03-21 23:01:03 +0000 |
commit | 8233050895f781befc1d4165435d0fff605b6b70 (patch) | |
tree | 98a69b40b23cf475ad5bd9f31ea12572ccb16616 /lib/IR | |
parent | ced228dec30f088367d622720d6ccf7a22cd11e4 (diff) | |
download | external_llvm-8233050895f781befc1d4165435d0fff605b6b70.zip external_llvm-8233050895f781befc1d4165435d0fff605b6b70.tar.gz external_llvm-8233050895f781befc1d4165435d0fff605b6b70.tar.bz2 |
Add a query to tell if a landing pad has a catch-all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Instructions.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/IR/Instructions.cpp b/lib/IR/Instructions.cpp index d58877e..841cc59 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 //===----------------------------------------------------------------------===// |