LLVM API Documentation

Public Member Functions | Static Public Member Functions | Protected Member Functions
llvm::InvokeInst Class Reference

#include <Instructions.h>

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

List of all members.

Public Member Functions

 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Provide fast operand accessors.
unsigned getNumArgOperands () const
ValuegetArgOperand (unsigned i) const
void setArgOperand (unsigned i, Value *v)
iterator_range< op_iteratorarg_operands ()
 arg_operands - iteration adapter for range-for loops.
iterator_range< const_op_iteratorarg_operands () const
 arg_operands - iteration adapter for range-for loops.
const UsegetArgOperandUse (unsigned i) const
 Wrappers for getting the Use of a invoke argument.
UsegetArgOperandUse (unsigned i)
CallingConv::ID getCallingConv () const
void setCallingConv (CallingConv::ID CC)
const AttributeSetgetAttributes () const
void setAttributes (const AttributeSet &Attrs)
void addAttribute (unsigned i, Attribute::AttrKind attr)
 addAttribute - adds the attribute to the list of attributes.
void removeAttribute (unsigned i, Attribute attr)
 removeAttribute - removes the attribute from the list of attributes.
bool hasFnAttr (Attribute::AttrKind A) const
 Determine whether this call has the given attribute.
bool paramHasAttr (unsigned i, Attribute::AttrKind A) const
 Determine whether the call or the callee has the given attributes.
unsigned getParamAlignment (unsigned i) const
 Extract the alignment for a call or parameter (0=unknown).
bool isNoBuiltin () const
 Return true if the call should not be treated as a call to a builtin.
bool isNoInline () const
 Return true if the call should not be inlined.
void setIsNoInline ()
bool doesNotAccessMemory () const
 Determine if the call does not access memory.
void setDoesNotAccessMemory ()
bool onlyReadsMemory () const
 Determine if the call does not access or only reads memory.
void setOnlyReadsMemory ()
bool doesNotReturn () const
 Determine if the call cannot return.
void setDoesNotReturn ()
bool doesNotThrow () const
 Determine if the call cannot unwind.
void setDoesNotThrow ()
bool cannotDuplicate () const
 Determine if the invoke cannot be duplicated.
void setCannotDuplicate ()
bool hasStructRetAttr () const
 Determine if the call returns a structure through first pointer argument.
bool hasByValArgument () const
 Determine if any call argument is an aggregate passed by value.
FunctiongetCalledFunction () const
const ValuegetCalledValue () const
ValuegetCalledValue ()
void setCalledFunction (Value *Fn)
 setCalledFunction - Set the function called.
BasicBlockgetNormalDest () const
BasicBlockgetUnwindDest () const
void setNormalDest (BasicBlock *B)
void setUnwindDest (BasicBlock *B)
LandingPadInstgetLandingPadInst () const
BasicBlockgetSuccessor (unsigned i) const
void setSuccessor (unsigned idx, BasicBlock *NewSucc)
unsigned getNumSuccessors () const

Static Public Member Functions

static InvokeInstCreate (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef< Value * > Args, const Twine &NameStr="", Instruction *InsertBefore=nullptr)
static InvokeInstCreate (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef< Value * > Args, 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

InvokeInstclone_impl () const override

Detailed Description

InvokeInst - Invoke instruction. The SubclassData field is used to hold the calling convention of the call.

Definition at line 2911 of file Instructions.h.


Member Function Documentation

addAttribute - adds the attribute to the list of attributes.

Definition at line 593 of file Instructions.cpp.

References llvm::AttributeSet::addAttribute(), getAttributes(), llvm::Value::getContext(), and setAttributes().

arg_operands - iteration adapter for range-for loops.

Definition at line 2963 of file Instructions.h.

arg_operands - iteration adapter for range-for loops.

Definition at line 2968 of file Instructions.h.

Determine if the invoke cannot be duplicated.

Definition at line 3058 of file Instructions.h.

References llvm::Attribute::NoDuplicate.

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

Reimplemented from llvm::TerminatorInst.

Definition at line 3123 of file Instructions.h.

References llvm::Instruction::getOpcode().

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

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

Reimplemented from llvm::TerminatorInst.

Definition at line 3126 of file Instructions.h.

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

Implements llvm::TerminatorInst.

Definition at line 3728 of file Instructions.cpp.

References llvm::User::getNumOperands().

static InvokeInst* llvm::InvokeInst::Create ( Value Func,
BasicBlock IfNormal,
BasicBlock IfException,
ArrayRef< Value * >  Args,
const Twine NameStr = "",
Instruction InsertBefore = nullptr 
) [inline, static]
static InvokeInst* llvm::InvokeInst::Create ( Value Func,
BasicBlock IfNormal,
BasicBlock IfException,
ArrayRef< Value * >  Args,
const Twine NameStr,
BasicBlock InsertAtEnd 
) [inline, static]

Definition at line 2941 of file Instructions.h.

References llvm::ArrayRef< T >::size().

Provide fast operand accessors.

Determine if the call does not access memory.

Definition at line 3030 of file Instructions.h.

References llvm::Attribute::ReadNone.

Determine if the call cannot return.

Definition at line 3046 of file Instructions.h.

References llvm::Attribute::NoReturn.

Determine if the call cannot unwind.

Definition at line 3052 of file Instructions.h.

References llvm::Attribute::NoUnwind.

getArgOperand/setArgOperand - Return/set the i-th invoke argument.

Definition at line 2959 of file Instructions.h.

Wrappers for getting the Use of a invoke argument.

Definition at line 2973 of file Instructions.h.

Definition at line 2974 of file Instructions.h.

getAttributes - Return the parameter attributes for this invoke.

Definition at line 2987 of file Instructions.h.

Referenced by addAttribute(), changeToCall(), removeAttribute(), and WriteInstruction().

getCalledFunction - Return the function called, or null if this is an indirect function invocation.

Definition at line 3078 of file Instructions.h.

References llvm::dyn_cast().

Referenced by paramHasAttr().

getCalledValue - Get a pointer to the function that is invoked by this instruction

Definition at line 3084 of file Instructions.h.

Referenced by changeToCall(), and WriteInstruction().

Definition at line 3085 of file Instructions.h.

getCallingConv/setCallingConv - Get or set the calling convention of this function call.

Definition at line 2978 of file Instructions.h.

Referenced by changeToCall(), and WriteInstruction().

getLandingPadInst - Get the landingpad instruction from the landing pad block (the unwind destination).

Definition at line 607 of file Instructions.cpp.

References llvm::BasicBlock::getFirstNonPHI(), and getUnwindDest().

Referenced by HandleInlinedInvoke().

getNumArgOperands - Return the number of invoke arguments.

Definition at line 2955 of file Instructions.h.

getNumSuccessors - Return the number of successors that this terminator has.

Reimplemented from llvm::TerminatorInst.

Definition at line 3120 of file Instructions.h.

Extract the alignment for a call or parameter (0=unknown).

Definition at line 3010 of file Instructions.h.

References llvm::AttributeSet::getParamAlignment().

getSuccessor - Return the specified successor.

Reimplemented from llvm::TerminatorInst.

Definition at line 3110 of file Instructions.h.

Determine if any call argument is an aggregate passed by value.

Definition at line 3071 of file Instructions.h.

References llvm::Attribute::ByVal, and llvm::AttributeSet::hasAttrSomewhere().

Determine whether this call has the given attribute.

Definition at line 3000 of file Instructions.h.

References llvm::Attribute::NoBuiltin.

Determine if the call returns a structure through first pointer argument.

Definition at line 3065 of file Instructions.h.

References llvm::Attribute::StructRet.

bool llvm::InvokeInst::isNoBuiltin ( ) const [inline]

Return true if the call should not be treated as a call to a builtin.

Definition at line 3016 of file Instructions.h.

References llvm::Attribute::Builtin, and llvm::Attribute::NoBuiltin.

bool llvm::InvokeInst::isNoInline ( ) const [inline]

Return true if the call should not be inlined.

Definition at line 3024 of file Instructions.h.

References llvm::Attribute::NoInline.

Determine if the call does not access or only reads memory.

Definition at line 3038 of file Instructions.h.

References llvm::Attribute::ReadOnly.

Determine whether the call or the callee has the given attributes.

Definition at line 585 of file Instructions.cpp.

References F(), getCalledFunction(), and llvm::AttributeSet::hasAttribute().

removeAttribute - removes the attribute from the list of attributes.

Definition at line 599 of file Instructions.cpp.

References getAttributes(), llvm::Value::getContext(), llvm::AttributeSet::removeAttributes(), and setAttributes().

void llvm::InvokeInst::setArgOperand ( unsigned  i,
Value v 
) [inline]

Definition at line 2960 of file Instructions.h.

setAttributes - Set the parameter attributes for this invoke.

Definition at line 2991 of file Instructions.h.

Referenced by addAttribute(), and removeAttribute().

void llvm::InvokeInst::setCalledFunction ( Value Fn) [inline]

setCalledFunction - Set the function called.

Definition at line 3088 of file Instructions.h.

Definition at line 2981 of file Instructions.h.

Definition at line 3099 of file Instructions.h.

void llvm::InvokeInst::setSuccessor ( unsigned  idx,
BasicBlock B 
) [inline]

setSuccessor - Update the specified successor to point at the provided block.

Reimplemented from llvm::TerminatorInst.

Definition at line 3115 of file Instructions.h.

Definition at line 3102 of file Instructions.h.


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