diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-08-12 20:24:12 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-08-12 20:24:12 +0000 |
commit | e6e8826870bee3facb04f950f0bd725f8a88623d (patch) | |
tree | 5fe10abfdbebc25ea75271004fe7afae60a3943e /include/llvm/BasicBlock.h | |
parent | 79628e92e1f903d50340d4cd3d1ea8c5fff63a87 (diff) |
Initial commit of the 'landingpad' instruction.
This implements the 'landingpad' instruction. It's used to indicate that a basic
block is a landing pad. There are several restrictions on its use (see
LangRef.html for more detail). These restrictions allow the exception handling
code to gather the information it needs in a much more sane way.
This patch has the definition, implementation, C interface, parsing, and bitcode
support in it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/BasicBlock.h')
-rw-r--r-- | include/llvm/BasicBlock.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index 3b953c06a8..d5966290a1 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -22,6 +22,7 @@ namespace llvm { +class LandingPadInst; class TerminatorInst; class LLVMContext; class BlockAddress; @@ -258,6 +259,14 @@ public: /// to refer to basic block New instead of to us. void replaceSuccessorsPhiUsesWith(BasicBlock *New); + /// isLandingPad - Return true if this basic block is a landing pad. I.e., + /// it's the destination of the 'unwind' edge of an invoke instruction. + bool isLandingPad() const; + + /// getLandingPadInst() - Return the landingpad instruction associated with + /// the landing pad. + LandingPadInst *getLandingPadInst(); + private: /// AdjustBlockAddressRefCount - BasicBlock stores the number of BlockAddress /// objects using it. This is almost always 0, sometimes one, possibly but |