class LandingPadInst

Declaration

class LandingPadInst : public Instruction { /* full declaration omitted */ };

Description

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.

Declared at: llvm/include/llvm/IR/Instructions.h:2916

Inherits from: Instruction

Member Variables

private unsigned int ReservedSpace
The number of operands actually allocated. NumOperands is the number actually in use.

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • public static llvm::LandingPadInst * Create(llvm::Type * RetTy, unsigned int NumReservedClauses, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::LandingPadInst * Create(llvm::Type * RetTy, unsigned int NumReservedClauses, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • private LandingPadInst(llvm::Type * RetTy, unsigned int NumReservedValues, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • private LandingPadInst(llvm::Type * RetTy, unsigned int NumReservedValues, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • private LandingPadInst(const llvm::LandingPadInst & LP)
  • public void addClause(llvm::Constant * ClauseVal)
  • public static bool classof(const llvm::Value * V)
  • public static bool classof(const llvm::Instruction * I)
  • protected llvm::LandingPadInst * cloneImpl() const
  • public llvm::Constant * getClause(unsigned int Idx) const
  • public unsigned int getNumClauses() const
  • private void growOperands(unsigned int Size)
  • private void init(unsigned int NumReservedValues, const llvm::Twine & NameStr)
  • public bool isCatch(unsigned int Idx) const
  • public bool isCleanup() const
  • public bool isFilter(unsigned int Idx) const
  • public void reserveClauses(unsigned int Size)
  • public void setCleanup(bool V)

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

static llvm::LandingPadInst* Create(
    llvm::Type* RetTy,
    unsigned int NumReservedClauses,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:2951

Parameters

llvm::Type* RetTy
unsigned int NumReservedClauses
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::LandingPadInst* Create(
    llvm::Type* RetTy,
    unsigned int NumReservedClauses,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:2954

Parameters

llvm::Type* RetTy
unsigned int NumReservedClauses
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

LandingPadInst(llvm::Type* RetTy,
               unsigned int NumReservedValues,
               const llvm::Twine& NameStr,
               llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/Instructions.h:2929

Parameters

llvm::Type* RetTy
unsigned int NumReservedValues
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

LandingPadInst(llvm::Type* RetTy,
               unsigned int NumReservedValues,
               const llvm::Twine& NameStr,
               llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:2931

Parameters

llvm::Type* RetTy
unsigned int NumReservedValues
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

LandingPadInst(const llvm::LandingPadInst& LP)

Declared at: llvm/include/llvm/IR/Instructions.h:2923

Parameters

const llvm::LandingPadInst& LP

void addClause(llvm::Constant* ClauseVal)

Description

Add a catch or filter clause to the landing pad.

Declared at: llvm/include/llvm/IR/Instructions.h:2969

Parameters

llvm::Constant* ClauseVal

static bool classof(const llvm::Value* V)

Declared at: llvm/include/llvm/IR/Instructions.h:2998

Parameters

const llvm::Value* V

static bool classof(const llvm::Instruction* I)

Declared at: llvm/include/llvm/IR/Instructions.h:2995

Parameters

const llvm::Instruction* I

llvm::LandingPadInst* cloneImpl() const

Declared at: llvm/include/llvm/IR/Instructions.h:2944

llvm::Constant* getClause(unsigned int Idx) const

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:2973

Parameters

unsigned int Idx

unsigned int getNumClauses() const

Description

Get the number of clauses for this landing pad.

Declared at: llvm/include/llvm/IR/Instructions.h:2988

void growOperands(unsigned int Size)

Declared at: llvm/include/llvm/IR/Instructions.h:2937

Parameters

unsigned int Size

void init(unsigned int NumReservedValues,
          const llvm::Twine& NameStr)

Declared at: llvm/include/llvm/IR/Instructions.h:2938

Parameters

unsigned int NumReservedValues
const llvm::Twine& NameStr

bool isCatch(unsigned int Idx) const

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:2978

Parameters

unsigned int Idx

bool isCleanup() const

Description

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.

Declared at: llvm/include/llvm/IR/Instructions.h:2963

bool isFilter(unsigned int Idx) const

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:2983

Parameters

unsigned int Idx

void reserveClauses(unsigned int Size)

Description

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

Declared at: llvm/include/llvm/IR/Instructions.h:2992

Parameters

unsigned int Size

void setCleanup(bool V)

Description

Indicate that this landingpad instruction is a cleanup.

Declared at: llvm/include/llvm/IR/Instructions.h:2966

Parameters

bool V