LLVM API Documentation

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

virtual InvokeInstclone () const
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Provide fast operand accessors.
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
const AttrListPtrgetAttributes () const
void setAttributes (const AttrListPtr &Attrs)
void addAttribute (unsigned i, Attributes attr)
 addAttribute - adds the attribute to the list of attributes.
void removeAttribute (unsigned i, Attributes attr)
 removeAttribute - removes the attribute from the list of attributes.
bool paramHasAttr (unsigned i, Attributes attr) const
 Determine whether the call or the callee has the given attribute.
unsigned getParamAlignment (unsigned i) const
 Extract the alignment for a call or parameter (0=unknown).
bool doesNotAccessMemory () const
 Determine if the call does not access memory.
void setDoesNotAccessMemory (bool NotAccessMemory=true)
bool onlyReadsMemory () const
 Determine if the call does not access or only reads memory.
void setOnlyReadsMemory (bool OnlyReadsMemory=true)
bool doesNotReturn () const
 Determine if the call cannot return.
void setDoesNotReturn (bool DoesNotReturn=true)
bool doesNotThrow () const
 Determine if the call cannot unwind.
void setDoesNotThrow (bool DoesNotThrow=true)
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 ()
BasicBlockgetNormalDest () const
BasicBlockgetUnwindDest () const
void setNormalDest (BasicBlock *B)
void setUnwindDest (BasicBlock *B)
BasicBlockgetSuccessor (unsigned i) const
void setSuccessor (unsigned idx, BasicBlock *NewSucc)
unsigned getNumSuccessors () const

Static Public Member Functions

template<typename InputIterator>
static InvokeInstCreate (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, InputIterator ArgBegin, InputIterator ArgEnd, const std::string &NameStr="", Instruction *InsertBefore=0)
template<typename InputIterator>
static InvokeInstCreate (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, InputIterator ArgBegin, InputIterator ArgEnd, const std::string &NameStr, BasicBlock *InsertAtEnd)
static bool classof (const InvokeInst *)
static bool classof (const Instruction *I)
 Methods for support type inquiry through isa, cast, and dyn_cast:.
static bool classof (const Value *V)


Detailed Description

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

Definition at line 2356 of file Instructions.h.


Member Function Documentation

template<typename InputIterator>
static InvokeInst* llvm::InvokeInst::Create ( Value Func,
BasicBlock IfNormal,
BasicBlock IfException,
InputIterator  ArgBegin,
InputIterator  ArgEnd,
const std::string &  NameStr = "",
Instruction InsertBefore = 0 
) [inline, static]

Definition at line 2403 of file Instructions.h.

References Values.

Referenced by llvm::IRBuilder< preserveNames, T >::CreateInvoke(), and HandleInlinedInvoke().

template<typename InputIterator>
static InvokeInst* llvm::InvokeInst::Create ( Value Func,
BasicBlock IfNormal,
BasicBlock IfException,
InputIterator  ArgBegin,
InputIterator  ArgEnd,
const std::string &  NameStr,
BasicBlock InsertAtEnd 
) [inline, static]

Definition at line 2413 of file Instructions.h.

References Values.

InvokeInst * InvokeInst::clone (  )  const [virtual]

clone() - Create a copy of 'this' instruction that is identical in all ways except the following: The instruction has no parent The instruction has no name

Implements llvm::TerminatorInst.

Definition at line 2912 of file Instructions.cpp.

References llvm::User::getNumOperands().

llvm::InvokeInst::DECLARE_TRANSPARENT_OPERAND_ACCESSORS ( Value   ) 

Provide fast operand accessors.

unsigned llvm::InvokeInst::getCallingConv (  )  const [inline]

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

Definition at line 2430 of file Instructions.h.

Referenced by ChangeToCall(), and WriteInstruction().

void llvm::InvokeInst::setCallingConv ( unsigned  CC  )  [inline]

Definition at line 2431 of file Instructions.h.

const AttrListPtr& llvm::InvokeInst::getAttributes (  )  const [inline]

getAttributes - Return the parameter attributes for this invoke.

Definition at line 2437 of file Instructions.h.

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

void llvm::InvokeInst::setAttributes ( const AttrListPtr Attrs  )  [inline]

setAttributes - Set the parameter attributes for this invoke.

Definition at line 2441 of file Instructions.h.

Referenced by addAttribute(), and removeAttribute().

void InvokeInst::addAttribute ( unsigned  i,
Attributes  attr 
)

addAttribute - adds the attribute to the list of attributes.

Definition at line 484 of file Instructions.cpp.

References llvm::AttrListPtr::addAttr(), getAttributes(), and setAttributes().

void InvokeInst::removeAttribute ( unsigned  i,
Attributes  attr 
)

removeAttribute - removes the attribute from the list of attributes.

Definition at line 490 of file Instructions.cpp.

References getAttributes(), llvm::AttrListPtr::removeAttr(), and setAttributes().

bool InvokeInst::paramHasAttr ( unsigned  i,
Attributes  attr 
) const

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

Definition at line 476 of file Instructions.cpp.

References F, getCalledFunction(), and llvm::AttrListPtr::paramHasAttr().

unsigned llvm::InvokeInst::getParamAlignment ( unsigned  i  )  const [inline]

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

Definition at line 2453 of file Instructions.h.

References llvm::AttrListPtr::getParamAlignment().

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

Determine if the call does not access memory.

Definition at line 2458 of file Instructions.h.

References llvm::Attribute::ReadNone.

void llvm::InvokeInst::setDoesNotAccessMemory ( bool  NotAccessMemory = true  )  [inline]

Definition at line 2461 of file Instructions.h.

References llvm::Attribute::ReadNone.

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

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

Definition at line 2467 of file Instructions.h.

References llvm::Attribute::ReadOnly.

void llvm::InvokeInst::setOnlyReadsMemory ( bool  OnlyReadsMemory = true  )  [inline]

Definition at line 2470 of file Instructions.h.

References llvm::Attribute::ReadNone, and llvm::Attribute::ReadOnly.

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

Determine if the call cannot return.

Definition at line 2476 of file Instructions.h.

References llvm::Attribute::NoReturn.

void llvm::InvokeInst::setDoesNotReturn ( bool  DoesNotReturn = true  )  [inline]

Definition at line 2479 of file Instructions.h.

References llvm::Attribute::NoReturn.

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

Determine if the call cannot unwind.

Definition at line 2485 of file Instructions.h.

References llvm::Attribute::NoUnwind.

void llvm::InvokeInst::setDoesNotThrow ( bool  DoesNotThrow = true  )  [inline]

Definition at line 2488 of file Instructions.h.

References llvm::Attribute::NoUnwind.

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

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

Definition at line 2495 of file Instructions.h.

References llvm::Attribute::StructRet.

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

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

Definition at line 2501 of file Instructions.h.

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

Function* llvm::InvokeInst::getCalledFunction (  )  const [inline]

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

Definition at line 2508 of file Instructions.h.

References llvm::dyn_cast().

Referenced by paramHasAttr().

const Value* llvm::InvokeInst::getCalledValue (  )  const [inline]

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

Definition at line 2514 of file Instructions.h.

Referenced by ChangeToCall().

Value* llvm::InvokeInst::getCalledValue (  )  [inline]

Definition at line 2515 of file Instructions.h.

BasicBlock* llvm::InvokeInst::getNormalDest (  )  const [inline]

Definition at line 2518 of file Instructions.h.

Referenced by ChangeToCall(), and llvm::DemoteRegToStack().

BasicBlock* llvm::InvokeInst::getUnwindDest (  )  const [inline]

Definition at line 2521 of file Instructions.h.

Referenced by ChangeToCall(), and HandleInlinedInvoke().

void llvm::InvokeInst::setNormalDest ( BasicBlock B  )  [inline]

Definition at line 2524 of file Instructions.h.

void llvm::InvokeInst::setUnwindDest ( BasicBlock B  )  [inline]

Definition at line 2528 of file Instructions.h.

BasicBlock* llvm::InvokeInst::getSuccessor ( unsigned  idx  )  const [inline]

getSuccessor - Return the specified successor.

Reimplemented from llvm::TerminatorInst.

Definition at line 2532 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 2537 of file Instructions.h.

unsigned llvm::InvokeInst::getNumSuccessors (  )  const [inline]

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

Reimplemented from llvm::TerminatorInst.

Definition at line 2542 of file Instructions.h.

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

Definition at line 2545 of file Instructions.h.

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

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

Reimplemented from llvm::TerminatorInst.

Definition at line 2546 of file Instructions.h.

References llvm::Instruction::getOpcode().

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

Reimplemented from llvm::TerminatorInst.

Definition at line 2549 of file Instructions.h.


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.