LLVM  6.0.0svn
Functions
Call Sites and Invocations

Functions in this group apply to instructions that refer to call sites and invocations. More...

Collaboration diagram for Call Sites and Invocations:

Functions

unsigned LLVMGetNumArgOperands (LLVMValueRef Instr)
 Obtain the argument count for a call instruction. More...
 
void LLVMSetInstructionCallConv (LLVMValueRef Instr, unsigned CC)
 Set the calling convention for a call instruction. More...
 
unsigned LLVMGetInstructionCallConv (LLVMValueRef Instr)
 Obtain the calling convention for a call instruction. More...
 
void LLVMSetInstrParamAlignment (LLVMValueRef Instr, unsigned index, unsigned Align)
 
void LLVMAddCallSiteAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
 
unsigned LLVMGetCallSiteAttributeCount (LLVMValueRef C, LLVMAttributeIndex Idx)
 
void LLVMGetCallSiteAttributes (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
 
LLVMAttributeRef LLVMGetCallSiteEnumAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
 
LLVMAttributeRef LLVMGetCallSiteStringAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
 
void LLVMRemoveCallSiteEnumAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
 
void LLVMRemoveCallSiteStringAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
 
LLVMValueRef LLVMGetCalledValue (LLVMValueRef Instr)
 Obtain the pointer to the function invoked by this instruction. More...
 
LLVMBool LLVMIsTailCall (LLVMValueRef CallInst)
 Obtain whether a call instruction is a tail call. More...
 
void LLVMSetTailCall (LLVMValueRef CallInst, LLVMBool IsTailCall)
 Set whether a call instruction is a tail call. More...
 
LLVMBasicBlockRef LLVMGetNormalDest (LLVMValueRef InvokeInst)
 Return the normal destination basic block. More...
 
LLVMBasicBlockRef LLVMGetUnwindDest (LLVMValueRef InvokeInst)
 Return the unwind destination basic block. More...
 
void LLVMSetNormalDest (LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
 Set the normal destination basic block. More...
 
void LLVMSetUnwindDest (LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
 Set the unwind destination basic block. More...
 

Detailed Description

Functions in this group apply to instructions that refer to call sites and invocations.

These correspond to C++ types in the llvm::CallInst class tree.

Function Documentation

◆ LLVMAddCallSiteAttribute()

void LLVMAddCallSiteAttribute ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
LLVMAttributeRef  A 
)

◆ LLVMGetCalledValue()

LLVMValueRef LLVMGetCalledValue ( LLVMValueRef  Instr)

Obtain the pointer to the function invoked by this instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

See also
llvm::CallInst::getCalledValue()
llvm::InvokeInst::getCalledValue()

Definition at line 2232 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetCallSiteAttributeCount()

unsigned LLVMGetCallSiteAttributeCount ( LLVMValueRef  C,
LLVMAttributeIndex  Idx 
)

Definition at line 2192 of file Core.cpp.

References AS.

◆ LLVMGetCallSiteAttributes()

void LLVMGetCallSiteAttributes ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
LLVMAttributeRef Attrs 
)

Definition at line 2199 of file Core.cpp.

References AS, and llvm::wrap().

◆ LLVMGetCallSiteEnumAttribute()

LLVMAttributeRef LLVMGetCallSiteEnumAttribute ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
unsigned  KindID 
)

Definition at line 2207 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetCallSiteStringAttribute()

LLVMAttributeRef LLVMGetCallSiteStringAttribute ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
const char K,
unsigned  KLen 
)

Definition at line 2214 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetInstructionCallConv()

unsigned LLVMGetInstructionCallConv ( LLVMValueRef  Instr)

Obtain the calling convention for a call instruction.

This is the opposite of LLVMSetInstructionCallConv(). Reads its usage.

See also
LLVMSetInstructionCallConv()

Definition at line 2171 of file Core.cpp.

References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getCallingConv().

◆ LLVMGetNormalDest()

LLVMBasicBlockRef LLVMGetNormalDest ( LLVMValueRef  InvokeInst)

Return the normal destination basic block.

This only works on llvm::InvokeInst instructions.

See also
llvm::InvokeInst::getNormalDest()

Definition at line 2248 of file Core.cpp.

References llvm::wrap().

◆ LLVMGetNumArgOperands()

unsigned LLVMGetNumArgOperands ( LLVMValueRef  Instr)

Obtain the argument count for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

See also
llvm::CallInst::getNumArgOperands()
llvm::InvokeInst::getNumArgOperands()

Definition at line 2167 of file Core.cpp.

References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::getNumArgOperands().

◆ LLVMGetUnwindDest()

LLVMBasicBlockRef LLVMGetUnwindDest ( LLVMValueRef  InvokeInst)

Return the unwind destination basic block.

This only works on llvm::InvokeInst instructions.

See also
llvm::InvokeInst::getUnwindDest()

Definition at line 2252 of file Core.cpp.

References llvm::wrap().

◆ LLVMIsTailCall()

LLVMBool LLVMIsTailCall ( LLVMValueRef  CallInst)

Obtain whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

See also
llvm::CallInst::isTailCall()

Definition at line 2238 of file Core.cpp.

◆ LLVMRemoveCallSiteEnumAttribute()

void LLVMRemoveCallSiteEnumAttribute ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
unsigned  KindID 
)

◆ LLVMRemoveCallSiteStringAttribute()

void LLVMRemoveCallSiteStringAttribute ( LLVMValueRef  C,
LLVMAttributeIndex  Idx,
const char K,
unsigned  KLen 
)

◆ LLVMSetInstrParamAlignment()

void LLVMSetInstrParamAlignment ( LLVMValueRef  Instr,
unsigned  index,
unsigned  Align 
)

◆ LLVMSetInstructionCallConv()

void LLVMSetInstructionCallConv ( LLVMValueRef  Instr,
unsigned  CC 
)

Set the calling convention for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

See also
llvm::CallInst::setCallingConv()
llvm::InvokeInst::setCallingConv()

Definition at line 2175 of file Core.cpp.

References llvm::CallSiteBase< FunTy, BBTy, ValTy, UserTy, UseTy, InstrTy, CallTy, InvokeTy, IterTy >::setCallingConv().

◆ LLVMSetNormalDest()

void LLVMSetNormalDest ( LLVMValueRef  InvokeInst,
LLVMBasicBlockRef  B 
)

Set the normal destination basic block.

This only works on llvm::InvokeInst instructions.

See also
llvm::InvokeInst::setNormalDest()

Definition at line 2256 of file Core.cpp.

References llvm::unwrap().

◆ LLVMSetTailCall()

void LLVMSetTailCall ( LLVMValueRef  CallInst,
LLVMBool  IsTailCall 
)

Set whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

See also
llvm::CallInst::setTailCall()

Definition at line 2242 of file Core.cpp.

◆ LLVMSetUnwindDest()

void LLVMSetUnwindDest ( LLVMValueRef  InvokeInst,
LLVMBasicBlockRef  B 
)

Set the unwind destination basic block.

This only works on llvm::InvokeInst instructions.

See also
llvm::InvokeInst::setUnwindDest()

Definition at line 2260 of file Core.cpp.

References llvm::unwrap().