class CatchSwitchInst

Declaration

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

Description

LLVM Value Representation This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table. Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/IR/ValueHandle.h for details.

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

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

  • private CatchSwitchInst(llvm::Value * ParentPad, llvm::BasicBlock * UnwindDest, unsigned int NumHandlers, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • private CatchSwitchInst(llvm::Value * ParentPad, llvm::BasicBlock * UnwindDest, unsigned int NumHandlers, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • private CatchSwitchInst(const llvm::CatchSwitchInst & CSI)
  • public static llvm::CatchSwitchInst * Create(llvm::Value * ParentPad, llvm::BasicBlock * UnwindDest, unsigned int NumHandlers, const llvm::Twine & NameStr = "", llvm::Instruction * InsertBefore = nullptr)
  • public static llvm::CatchSwitchInst * Create(llvm::Value * ParentPad, llvm::BasicBlock * UnwindDest, unsigned int NumHandlers, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public void addHandler(llvm::BasicBlock * Dest)
  • public static bool classof(const llvm::Value * V)
  • public static bool classof(const llvm::Instruction * I)
  • protected llvm::CatchSwitchInst * cloneImpl() const
  • public unsigned int getNumHandlers() const
  • public unsigned int getNumSuccessors() const
  • public llvm::Value * getParentPad() const
  • public llvm::BasicBlock * getSuccessor(unsigned int Idx) const
  • public llvm::BasicBlock * getUnwindDest() const
  • private void growOperands(unsigned int Size)
  • public llvm::CatchSwitchInst::handler_iterator handler_begin()
  • public llvm::CatchSwitchInst::const_handler_iterator handler_begin() const
  • public llvm::CatchSwitchInst::handler_iterator handler_end()
  • public llvm::CatchSwitchInst::const_handler_iterator handler_end() const
  • private static llvm::BasicBlock * handler_helper(llvm::Value * V)
  • private static const llvm::BasicBlock * handler_helper(const llvm::Value * V)
  • public llvm::CatchSwitchInst::handler_range handlers()
  • public llvm::CatchSwitchInst::const_handler_range handlers() const
  • public bool hasUnwindDest() const
  • private void init(llvm::Value * ParentPad, llvm::BasicBlock * UnwindDest, unsigned int NumReserved)
  • public void removeHandler(llvm::CatchSwitchInst::handler_iterator HI)
  • public void setParentPad(llvm::Value * ParentPad)
  • public void setSuccessor(unsigned int Idx, llvm::BasicBlock * NewSucc)
  • public void setUnwindDest(llvm::BasicBlock * UnwindDest)
  • public bool unwindsToCaller() const

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

CatchSwitchInst(llvm::Value* ParentPad,
                llvm::BasicBlock* UnwindDest,
                unsigned int NumHandlers,
                const llvm::Twine& NameStr,
                llvm::Instruction* InsertBefore)

Description

Create a new switch instruction, specifying a default destination. The number of additional handlers can be specified here to make memory allocation more efficient. This constructor can also autoinsert before another instruction.

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

Parameters

llvm::Value* ParentPad
llvm::BasicBlock* UnwindDest
unsigned int NumHandlers
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

CatchSwitchInst(llvm::Value* ParentPad,
                llvm::BasicBlock* UnwindDest,
                unsigned int NumHandlers,
                const llvm::Twine& NameStr,
                llvm::BasicBlock* InsertAtEnd)

Description

Create a new switch instruction, specifying a default destination. The number of additional handlers can be specified here to make memory allocation more efficient. This constructor also autoinserts at the end of the specified BasicBlock.

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

Parameters

llvm::Value* ParentPad
llvm::BasicBlock* UnwindDest
unsigned int NumHandlers
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

CatchSwitchInst(const llvm::CatchSwitchInst& CSI)

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

Parameters

const llvm::CatchSwitchInst& CSI

static llvm::CatchSwitchInst* Create(
    llvm::Value* ParentPad,
    llvm::BasicBlock* UnwindDest,
    unsigned int NumHandlers,
    const llvm::Twine& NameStr = "",
    llvm::Instruction* InsertBefore = nullptr)

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

Parameters

llvm::Value* ParentPad
llvm::BasicBlock* UnwindDest
unsigned int NumHandlers
const llvm::Twine& NameStr = ""
llvm::Instruction* InsertBefore = nullptr

static llvm::CatchSwitchInst* Create(
    llvm::Value* ParentPad,
    llvm::BasicBlock* UnwindDest,
    unsigned int NumHandlers,
    const llvm::Twine& NameStr,
    llvm::BasicBlock* InsertAtEnd)

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

Parameters

llvm::Value* ParentPad
llvm::BasicBlock* UnwindDest
unsigned int NumHandlers
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

void addHandler(llvm::BasicBlock* Dest)

Description

Add an entry to the switch instruction... Note: This action invalidates handler_end(). Old handler_end() iterator will point to the added handler.

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

Parameters

llvm::BasicBlock* Dest

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

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

Parameters

const llvm::Value* V

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

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

Parameters

const llvm::Instruction* I

llvm::CatchSwitchInst* cloneImpl() const

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

unsigned int getNumHandlers() const

Description

return the number of 'handlers' in this catchswitch instruction, except the default handler

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

unsigned int getNumSuccessors() const

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

llvm::Value* getParentPad() const

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

llvm::BasicBlock* getSuccessor(
    unsigned int Idx) const

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

Parameters

unsigned int Idx

llvm::BasicBlock* getUnwindDest() const

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

void growOperands(unsigned int Size)

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

Parameters

unsigned int Size

llvm::CatchSwitchInst::handler_iterator
handler_begin()

Description

Returns an iterator that points to the first handler in CatchSwitchInst.

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

llvm::CatchSwitchInst::const_handler_iterator
handler_begin() const

Description

Returns an iterator that points to the first handler in the CatchSwitchInst.

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

llvm::CatchSwitchInst::handler_iterator
handler_end()

Description

Returns a read-only iterator that points one past the last handler in the CatchSwitchInst.

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

llvm::CatchSwitchInst::const_handler_iterator
handler_end() const

Description

Returns an iterator that points one past the last handler in the CatchSwitchInst.

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

static llvm::BasicBlock* handler_helper(
    llvm::Value* V)

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

Parameters

llvm::Value* V

static const llvm::BasicBlock* handler_helper(
    const llvm::Value* V)

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

Parameters

const llvm::Value* V

llvm::CatchSwitchInst::handler_range handlers()

Description

iteration adapter for range-for loops.

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

llvm::CatchSwitchInst::const_handler_range
handlers() const

Description

iteration adapter for range-for loops.

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

bool hasUnwindDest() const

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

void init(llvm::Value* ParentPad,
          llvm::BasicBlock* UnwindDest,
          unsigned int NumReserved)

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

Parameters

llvm::Value* ParentPad
llvm::BasicBlock* UnwindDest
unsigned int NumReserved

void removeHandler(
    llvm::CatchSwitchInst::handler_iterator HI)

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

Parameters

llvm::CatchSwitchInst::handler_iterator HI

void setParentPad(llvm::Value* ParentPad)

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

Parameters

llvm::Value* ParentPad

void setSuccessor(unsigned int Idx,
                  llvm::BasicBlock* NewSucc)

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

Parameters

unsigned int Idx
llvm::BasicBlock* NewSucc

void setUnwindDest(llvm::BasicBlock* UnwindDest)

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

Parameters

llvm::BasicBlock* UnwindDest

bool unwindsToCaller() const

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