Thanks to visit codestin.com
Credit goes to llvm.org

LLVM 22.0.0git
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

LLVM_C_ABI unsigned LLVMGetNumArgOperands (LLVMValueRef Instr)
 Obtain the argument count for a call instruction.
LLVM_C_ABI void LLVMSetInstructionCallConv (LLVMValueRef Instr, unsigned CC)
 Set the calling convention for a call instruction.
LLVM_C_ABI unsigned LLVMGetInstructionCallConv (LLVMValueRef Instr)
 Obtain the calling convention for a call instruction.
LLVM_C_ABI void LLVMSetInstrParamAlignment (LLVMValueRef Instr, LLVMAttributeIndex Idx, unsigned Align)
LLVM_C_ABI void LLVMAddCallSiteAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
LLVM_C_ABI unsigned LLVMGetCallSiteAttributeCount (LLVMValueRef C, LLVMAttributeIndex Idx)
LLVM_C_ABI void LLVMGetCallSiteAttributes (LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteEnumAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteStringAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
LLVM_C_ABI void LLVMRemoveCallSiteEnumAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
LLVM_C_ABI void LLVMRemoveCallSiteStringAttribute (LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
LLVM_C_ABI LLVMTypeRef LLVMGetCalledFunctionType (LLVMValueRef C)
 Obtain the function type called by this instruction.
LLVM_C_ABI LLVMValueRef LLVMGetCalledValue (LLVMValueRef Instr)
 Obtain the pointer to the function invoked by this instruction.
LLVM_C_ABI unsigned LLVMGetNumOperandBundles (LLVMValueRef C)
 Obtain the number of operand bundles attached to this instruction.
LLVM_C_ABI LLVMOperandBundleRef LLVMGetOperandBundleAtIndex (LLVMValueRef C, unsigned Index)
 Obtain the operand bundle attached to this instruction at the given index.
LLVM_C_ABI LLVMBool LLVMIsTailCall (LLVMValueRef CallInst)
 Obtain whether a call instruction is a tail call.
LLVM_C_ABI void LLVMSetTailCall (LLVMValueRef CallInst, LLVMBool IsTailCall)
 Set whether a call instruction is a tail call.
LLVM_C_ABI LLVMTailCallKind LLVMGetTailCallKind (LLVMValueRef CallInst)
 Obtain a tail call kind of the call instruction.
LLVM_C_ABI void LLVMSetTailCallKind (LLVMValueRef CallInst, LLVMTailCallKind kind)
 Set the call kind of the call instruction.
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNormalDest (LLVMValueRef InvokeInst)
 Return the normal destination basic block.
LLVM_C_ABI LLVMBasicBlockRef LLVMGetUnwindDest (LLVMValueRef InvokeInst)
 Return the unwind destination basic block.
LLVM_C_ABI void LLVMSetNormalDest (LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
 Set the normal destination basic block.
LLVM_C_ABI void LLVMSetUnwindDest (LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
 Set the unwind destination basic block.
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrDefaultDest (LLVMValueRef CallBr)
 Get the default destination of a CallBr instruction.
LLVM_C_ABI unsigned LLVMGetCallBrNumIndirectDests (LLVMValueRef CallBr)
 Get the number of indirect destinations of a CallBr instruction.
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrIndirectDest (LLVMValueRef CallBr, unsigned Idx)
 Get the indirect destination of a CallBr instruction at the given index.

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()

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

Definition at line 3053 of file Core.cpp.

References A(), llvm::CallingConv::C, and llvm::unwrap().

◆ LLVMGetCallBrDefaultDest()

LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrDefaultDest ( LLVMValueRef CallBr)

Get the default destination of a CallBr instruction.

See also
llvm::CallBrInst::getDefaultDest()

Definition at line 3161 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCallBrIndirectDest()

LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrIndirectDest ( LLVMValueRef CallBr,
unsigned Idx )

Get the indirect destination of a CallBr instruction at the given index.

See also
llvm::CallBrInst::getIndirectDest()

Definition at line 3169 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCallBrNumIndirectDests()

LLVM_C_ABI unsigned LLVMGetCallBrNumIndirectDests ( LLVMValueRef CallBr)

Get the number of indirect destinations of a CallBr instruction.

See also
llvm::CallBrInst::getNumIndirectDests()

Definition at line 3165 of file Core.cpp.

References llvm::unwrap().

◆ LLVMGetCalledFunctionType()

LLVM_C_ABI LLVMTypeRef LLVMGetCalledFunctionType ( LLVMValueRef C)

Obtain the function type called by this instruction.

See also
llvm::CallBase::getFunctionType()

Definition at line 3101 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCalledValue()

LLVM_C_ABI 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::getCalledOperand()
llvm::InvokeInst::getCalledOperand()

Definition at line 3097 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCallSiteAttributeCount()

LLVM_C_ABI unsigned LLVMGetCallSiteAttributeCount ( LLVMValueRef C,
LLVMAttributeIndex Idx )

Definition at line 3058 of file Core.cpp.

References llvm::CallingConv::C, Call, and llvm::unwrap().

◆ LLVMGetCallSiteAttributes()

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

Definition at line 3065 of file Core.cpp.

References A(), llvm::CallingConv::C, Call, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCallSiteEnumAttribute()

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

Definition at line 3073 of file Core.cpp.

References llvm::CallingConv::C, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetCallSiteStringAttribute()

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

Definition at line 3080 of file Core.cpp.

References llvm::CallingConv::C, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetInstructionCallConv()

LLVM_C_ABI 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 3036 of file Core.cpp.

References llvm::unwrap().

◆ LLVMGetNormalDest()

LLVM_C_ABI 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 3135 of file Core.cpp.

References llvm::unwrap(), and llvm::wrap().

◆ LLVMGetNumArgOperands()

LLVM_C_ABI unsigned LLVMGetNumArgOperands ( LLVMValueRef Instr)

Obtain the argument count for a call instruction.

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

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

Definition at line 3027 of file Core.cpp.

References llvm::dyn_cast(), and llvm::unwrap().

◆ LLVMGetNumOperandBundles()

LLVM_C_ABI unsigned LLVMGetNumOperandBundles ( LLVMValueRef C)

Obtain the number of operand bundles attached to this instruction.

This only works on llvm::CallInst and llvm::InvokeInst instructions.

See also
llvm::CallBase::getNumOperandBundles()

Definition at line 3105 of file Core.cpp.

References llvm::CallingConv::C, and llvm::unwrap().

◆ LLVMGetOperandBundleAtIndex()

LLVM_C_ABI LLVMOperandBundleRef LLVMGetOperandBundleAtIndex ( LLVMValueRef C,
unsigned Index )

Obtain the operand bundle attached to this instruction at the given index.

Use LLVMDisposeOperandBundle to free the operand bundle.

This only works on llvm::CallInst and llvm::InvokeInst instructions.

Definition at line 3109 of file Core.cpp.

References llvm::CallingConv::C, llvm::unwrap(), and llvm::wrap().

◆ LLVMGetTailCallKind()

LLVM_C_ABI LLVMTailCallKind LLVMGetTailCallKind ( LLVMValueRef CallInst)

Obtain a tail call kind of the call instruction.

See also
llvm::CallInst::setTailCallKind()

Definition at line 3125 of file Core.cpp.

References Call, and llvm::unwrap().

◆ LLVMGetUnwindDest()

◆ LLVMIsTailCall()

LLVM_C_ABI 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 3117 of file Core.cpp.

References Call, and llvm::unwrap().

◆ LLVMRemoveCallSiteEnumAttribute()

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

Definition at line 3087 of file Core.cpp.

References llvm::CallingConv::C, and llvm::unwrap().

◆ LLVMRemoveCallSiteStringAttribute()

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

Definition at line 3092 of file Core.cpp.

References llvm::CallingConv::C, and llvm::unwrap().

◆ LLVMSetInstrParamAlignment()

LLVM_C_ABI void LLVMSetInstrParamAlignment ( LLVMValueRef Instr,
LLVMAttributeIndex Idx,
unsigned Align )

Definition at line 3045 of file Core.cpp.

References Call, llvm::Attribute::getWithAlignment(), and llvm::unwrap().

◆ LLVMSetInstructionCallConv()

LLVM_C_ABI 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 3040 of file Core.cpp.

References llvm::unwrap().

◆ LLVMSetNormalDest()

LLVM_C_ABI 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 3148 of file Core.cpp.

References B(), and llvm::unwrap().

◆ LLVMSetTailCall()

LLVM_C_ABI 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 3121 of file Core.cpp.

References Call, and llvm::unwrap().

◆ LLVMSetTailCallKind()

LLVM_C_ABI void LLVMSetTailCallKind ( LLVMValueRef CallInst,
LLVMTailCallKind kind )

Set the call kind of the call instruction.

See also
llvm::CallInst::getTailCallKind()

Definition at line 3129 of file Core.cpp.

References Call, and llvm::unwrap().

◆ LLVMSetUnwindDest()

LLVM_C_ABI void LLVMSetUnwindDest ( LLVMValueRef InvokeInst,
LLVMBasicBlockRef B )