LLVM API Documentation

Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::LandingPadInst Class Reference

#include <Instructions.h>

Inheritance diagram for llvm::LandingPadInst:
Inheritance graph
[legend]
Collaboration diagram for llvm::LandingPadInst:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ClauseType { Catch, Filter }

Public Member Functions

 ~LandingPadInst ()
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Provide fast operand accessors.
ValuegetPersonalityFn () const
bool isCleanup () const
void setCleanup (bool V)
 setCleanup - Indicate that this landingpad instruction is a cleanup.
void addClause (Constant *ClauseVal)
 Add a catch or filter clause to the landing pad.
ConstantgetClause (unsigned Idx) const
bool isCatch (unsigned Idx) const
 isCatch - Return 'true' if the clause and index Idx is a catch clause.
bool isFilter (unsigned Idx) const
 isFilter - Return 'true' if the clause and index Idx is a filter clause.
unsigned getNumClauses () const
 getNumClauses - Get the number of clauses for this landing pad.
void reserveClauses (unsigned Size)

Static Public Member Functions

static LandingPadInstCreate (Type *RetTy, Value *PersonalityFn, unsigned NumReservedClauses, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
static LandingPadInstCreate (Type *RetTy, Value *PersonalityFn, unsigned NumReservedClauses, const Twine &NameStr, BasicBlock *InsertAtEnd)
static bool classof (const Instruction *I)
static bool classof (const Value *V)
 Methods for support type inquiry through isa, cast, and dyn_cast:

Protected Member Functions

LandingPadInstclone_impl () const override

Detailed Description

LandingPadInst - The landingpad instruction holds all of the information necessary to generate correct exception handling. The landingpad instruction cannot be moved from the top of a landing pad block, which itself is accessible only from the 'unwind' edge of an invoke. This uses the SubclassData field in Value to store whether or not the landingpad is a cleanup.

Definition at line 2290 of file Instructions.h.


Member Enumeration Documentation

Enumerator:
Catch 
Filter 

Definition at line 2296 of file Instructions.h.


Constructor & Destructor Documentation

Definition at line 205 of file Instructions.cpp.

References llvm::User::dropHungoffUses().


Member Function Documentation

void LandingPadInst::addClause ( Constant ClauseVal)

Add a catch or filter clause to the landing pad.

Definition at line 251 of file Instructions.cpp.

References llvm::User::getNumOperands(), llvm::User::NumOperands, and llvm::User::OperandList.

Referenced by llvm::InstCombiner::visitLandingPadInst().

static bool llvm::LandingPadInst::classof ( const Instruction I) [inline, static]

Definition at line 2371 of file Instructions.h.

References llvm::Instruction::getOpcode(), and llvm::LandingPad.

static bool llvm::LandingPadInst::classof ( const Value V) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast:

Reimplemented from llvm::Instruction.

Definition at line 2374 of file Instructions.h.

LandingPadInst * LandingPadInst::clone_impl ( ) const [override, protected, virtual]

Implements llvm::Instruction.

Definition at line 3757 of file Instructions.cpp.

LandingPadInst * LandingPadInst::Create ( Type RetTy,
Value PersonalityFn,
unsigned  NumReservedClauses,
const Twine NameStr = "",
Instruction InsertBefore = nullptr 
) [static]

Constructors - NumReservedClauses is a hint for the number of incoming clauses that this landingpad will have (use 0 if you really have no idea).

Definition at line 209 of file Instructions.cpp.

Referenced by llvm::IRBuilder< true, TargetFolder >::CreateLandingPad(), and llvm::InstCombiner::visitLandingPadInst().

LandingPadInst * LandingPadInst::Create ( Type RetTy,
Value PersonalityFn,
unsigned  NumReservedClauses,
const Twine NameStr,
BasicBlock InsertAtEnd 
) [static]

Definition at line 217 of file Instructions.cpp.

Provide fast operand accessors.

Get the value of the clause at index Idx. Use isCatch/isFilter to determine what type of clause this is.

Definition at line 2349 of file Instructions.h.

Referenced by llvm::AddLandingPadInfo(), HandleInlinedInvoke(), llvm::InstCombiner::visitLandingPadInst(), and WriteInstruction().

getNumClauses - Get the number of clauses for this landing pad.

Definition at line 2364 of file Instructions.h.

Referenced by llvm::AddLandingPadInfo(), HandleInlinedInvoke(), llvm::InstCombiner::visitLandingPadInst(), and WriteInstruction().

getPersonalityFn - Get the personality function associated with this landing pad.

Definition at line 2331 of file Instructions.h.

Referenced by llvm::AddLandingPadInfo(), llvm::InlineFunction(), llvm::InstCombiner::visitLandingPadInst(), and WriteInstruction().

bool llvm::LandingPadInst::isCatch ( unsigned  Idx) const [inline]

isCatch - Return 'true' if the clause and index Idx is a catch clause.

Definition at line 2354 of file Instructions.h.

Referenced by llvm::AddLandingPadInfo(), llvm::InstCombiner::visitLandingPadInst(), and WriteInstruction().

isCleanup - Return 'true' if this landingpad instruction is a cleanup. I.e., it should be run when unwinding even if its landing pad doesn't catch the exception.

Definition at line 2336 of file Instructions.h.

Referenced by llvm::AddLandingPadInfo(), HandleInlinedInvoke(), llvm::InstCombiner::visitLandingPadInst(), and WriteInstruction().

bool llvm::LandingPadInst::isFilter ( unsigned  Idx) const [inline]

isFilter - Return 'true' if the clause and index Idx is a filter clause.

Definition at line 2359 of file Instructions.h.

Referenced by llvm::InstCombiner::visitLandingPadInst().

reserveClauses - Grow the size of the operand list to accommodate the new number of clauses.

Definition at line 2368 of file Instructions.h.

void llvm::LandingPadInst::setCleanup ( bool  V) [inline]

setCleanup - Indicate that this landingpad instruction is a cleanup.

Definition at line 2339 of file Instructions.h.

Referenced by llvm::InstCombiner::visitLandingPadInst().


The documentation for this class was generated from the following files: