LLVM API Documentation

llvm::InvokeInst Class Reference

#include <Instructions.h>

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

List of all members.

Public Member Functions

virtual InvokeInst * clone () const
 DECLARE_TRANSPARENT_OPERAND_ACCESSORS (Value)
 Provide fast operand accessors.
unsigned getCallingConv () const
void setCallingConv (unsigned CC)
const AttrListPtr & getAttributes () 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.
Function * getCalledFunction () const
const Value * getCalledValue () const
Value * getCalledValue ()
BasicBlock * getNormalDest () const
BasicBlock * getUnwindDest () const
void setNormalDest (BasicBlock *B)
void setUnwindDest (BasicBlock *B)
BasicBlock * getSuccessor (unsigned i) const
void setSuccessor (unsigned idx, BasicBlock *NewSucc)
unsigned getNumSuccessors () const

Static Public Member Functions

template<typename InputIterator>
static InvokeInst * Create (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, InputIterator ArgBegin, InputIterator ArgEnd, const std::string &NameStr="", Instruction *InsertBefore=0)
template<typename InputIterator>
static InvokeInst * Create (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 2378 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 2425 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 2435 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 2927 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 2452 of file Instructions.h.

Referenced by ChangeToCall(), and WriteInstruction().

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

Definition at line 2453 of file Instructions.h.

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

getAttributes - Return the parameter attributes for this invoke.

Definition at line 2459 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 2463 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 485 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 491 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 477 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 2475 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 2480 of file Instructions.h.

References llvm::Attribute::ReadNone.

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

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

References llvm::Attribute::ReadOnly.

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

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

References llvm::Attribute::NoReturn.

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

Definition at line 2501 of file Instructions.h.

References llvm::Attribute::NoReturn.

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

Determine if the call cannot unwind.

Definition at line 2507 of file Instructions.h.

References llvm::Attribute::NoUnwind.

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

Definition at line 2510 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 2517 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 2523 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 2530 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 2536 of file Instructions.h.

Referenced by ChangeToCall(), and WriteInstruction().

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

Definition at line 2537 of file Instructions.h.

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

Definition at line 2540 of file Instructions.h.

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

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

Definition at line 2543 of file Instructions.h.

Referenced by ChangeToCall(), HandleInlinedInvoke(), and WriteInstruction().

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

Definition at line 2546 of file Instructions.h.

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

Definition at line 2550 of file Instructions.h.

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

getSuccessor - Return the specified successor.

Reimplemented from llvm::TerminatorInst.

Definition at line 2554 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 2559 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 2564 of file Instructions.h.

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

Definition at line 2567 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 2568 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 2571 of file Instructions.h.


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