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 (LLVMContext &Context) 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 Twine &NameStr="", Instruction *InsertBefore=0)
template<typename InputIterator>
static InvokeInst * Create (Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, InputIterator ArgBegin, InputIterator ArgEnd, const Twine &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 2307 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 Twine &  NameStr = "",
Instruction *  InsertBefore = 0 
) [inline, static]

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

Definition at line 2364 of file Instructions.h.

References Values.

InvokeInst * InvokeInst::clone ( LLVMContext &  Context  )  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 3076 of file Instructions.cpp.

References llvm::User::getNumOperands(), and llvm::Value::SubclassOptionalData.

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 2381 of file Instructions.h.

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

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

Definition at line 2382 of file Instructions.h.

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

getAttributes - Return the parameter attributes for this invoke.

Definition at line 2388 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 2392 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 490 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 496 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 482 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 2404 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 2409 of file Instructions.h.

References llvm::Attribute::ReadNone.

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

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

References llvm::Attribute::ReadOnly.

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

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

References llvm::Attribute::NoReturn.

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

Definition at line 2430 of file Instructions.h.

References llvm::Attribute::NoReturn.

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

Determine if the call cannot unwind.

Definition at line 2436 of file Instructions.h.

References llvm::Attribute::NoUnwind.

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

Definition at line 2439 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 2446 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 2452 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 2459 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 2465 of file Instructions.h.

Referenced by ChangeToCall(), and WriteInstruction().

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

Definition at line 2466 of file Instructions.h.

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

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

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

Definition at line 2475 of file Instructions.h.

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

Definition at line 2479 of file Instructions.h.

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

getSuccessor - Return the specified successor.

Reimplemented from llvm::TerminatorInst.

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

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

Definition at line 2496 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 2497 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 2500 of file Instructions.h.


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