LLVM 22.0.0git
|
Functions in this group operate on LLVMValueRef instances that correspond to llvm::Function instances. More...
Modules | |
Function Parameters | |
Functions in this group relate to arguments/parameters on functions. | |
IFuncs | |
Functions in this group relate to indirect functions. | |
Functions | |
LLVM_C_ABI void | LLVMDeleteFunction (LLVMValueRef Fn) |
Remove a function from its containing module and deletes it. | |
LLVM_C_ABI LLVMBool | LLVMHasPersonalityFn (LLVMValueRef Fn) |
Check whether the given function has a personality function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetPersonalityFn (LLVMValueRef Fn) |
Obtain the personality function attached to the function. | |
LLVM_C_ABI void | LLVMSetPersonalityFn (LLVMValueRef Fn, LLVMValueRef PersonalityFn) |
Set the personality function attached to the function. | |
LLVM_C_ABI unsigned | LLVMLookupIntrinsicID (const char *Name, size_t NameLen) |
Obtain the intrinsic ID number which matches the given function name. | |
LLVM_C_ABI unsigned | LLVMGetIntrinsicID (LLVMValueRef Fn) |
Obtain the ID number from a function instance. | |
LLVM_C_ABI LLVMValueRef | LLVMGetIntrinsicDeclaration (LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount) |
Get or insert the declaration of an intrinsic. | |
LLVM_C_ABI LLVMTypeRef | LLVMIntrinsicGetType (LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount) |
Retrieves the type of an intrinsic. | |
LLVM_C_ABI const char * | LLVMIntrinsicGetName (unsigned ID, size_t *NameLength) |
Retrieves the name of an intrinsic. | |
LLVM_C_ABI char * | LLVMIntrinsicCopyOverloadedName (unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength) |
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. | |
LLVM_C_ABI char * | LLVMIntrinsicCopyOverloadedName2 (LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength) |
Copies the name of an overloaded intrinsic identified by a given list of parameter types. | |
LLVM_C_ABI LLVMBool | LLVMIntrinsicIsOverloaded (unsigned ID) |
Obtain if the intrinsic identified by the given ID is overloaded. | |
LLVM_C_ABI unsigned | LLVMGetFunctionCallConv (LLVMValueRef Fn) |
Obtain the calling function of a function. | |
LLVM_C_ABI void | LLVMSetFunctionCallConv (LLVMValueRef Fn, unsigned CC) |
Set the calling convention of a function. | |
LLVM_C_ABI const char * | LLVMGetGC (LLVMValueRef Fn) |
Obtain the name of the garbage collector to use during code generation. | |
LLVM_C_ABI void | LLVMSetGC (LLVMValueRef Fn, const char *Name) |
Define the garbage collector to use during code generation. | |
LLVM_C_ABI LLVMValueRef | LLVMGetPrefixData (LLVMValueRef Fn) |
Gets the prefix data associated with a function. | |
LLVM_C_ABI LLVMBool | LLVMHasPrefixData (LLVMValueRef Fn) |
Check if a given function has prefix data. | |
LLVM_C_ABI void | LLVMSetPrefixData (LLVMValueRef Fn, LLVMValueRef prefixData) |
Sets the prefix data for the function. | |
LLVM_C_ABI LLVMValueRef | LLVMGetPrologueData (LLVMValueRef Fn) |
Gets the prologue data associated with a function. | |
LLVM_C_ABI LLVMBool | LLVMHasPrologueData (LLVMValueRef Fn) |
Check if a given function has prologue data. | |
LLVM_C_ABI void | LLVMSetPrologueData (LLVMValueRef Fn, LLVMValueRef prologueData) |
Sets the prologue data for the function. | |
LLVM_C_ABI void | LLVMAddAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A) |
Add an attribute to a function. | |
LLVM_C_ABI unsigned | LLVMGetAttributeCountAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx) |
LLVM_C_ABI void | LLVMGetAttributesAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs) |
LLVM_C_ABI LLVMAttributeRef | LLVMGetEnumAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID) |
LLVM_C_ABI LLVMAttributeRef | LLVMGetStringAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen) |
LLVM_C_ABI void | LLVMRemoveEnumAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID) |
LLVM_C_ABI void | LLVMRemoveStringAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen) |
LLVM_C_ABI void | LLVMAddTargetDependentFunctionAttr (LLVMValueRef Fn, const char *A, const char *V) |
Add a target-dependent attribute to a function. | |
Functions in this group operate on LLVMValueRef instances that correspond to llvm::Function instances.
LLVM_C_ABI void LLVMAddAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
LLVMAttributeRef | A | ||
) |
LLVM_C_ABI void LLVMAddTargetDependentFunctionAttr | ( | LLVMValueRef | Fn, |
const char * | A, | ||
const char * | V | ||
) |
Add a target-dependent attribute to a function.
Definition at line 2621 of file Core.cpp.
References A, and llvm::Attribute::get().
LLVM_C_ABI void LLVMDeleteFunction | ( | LLVMValueRef | Fn | ) |
Remove a function from its containing module and deletes it.
LLVM_C_ABI unsigned LLVMGetAttributeCountAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx | ||
) |
LLVM_C_ABI void LLVMGetAttributesAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
LLVMAttributeRef * | Attrs | ||
) |
LLVM_C_ABI LLVMAttributeRef LLVMGetEnumAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
unsigned | KindID | ||
) |
Definition at line 2597 of file Core.cpp.
References F, Idx, and llvm::wrap().
LLVM_C_ABI unsigned LLVMGetFunctionCallConv | ( | LLVMValueRef | Fn | ) |
Obtain the calling function of a function.
The returned value corresponds to the LLVMCallConv enumeration.
LLVM_C_ABI const char * LLVMGetGC | ( | LLVMValueRef | Fn | ) |
Obtain the name of the garbage collector to use during code generation.
Definition at line 2535 of file Core.cpp.
References F.
LLVM_C_ABI LLVMValueRef LLVMGetIntrinsicDeclaration | ( | LLVMModuleRef | Mod, |
unsigned | ID, | ||
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount | ||
) |
Get or insert the declaration of an intrinsic.
For overloaded intrinsics, parameter types must be provided to uniquely identify an overload.
Definition at line 2475 of file Core.cpp.
References llvm::Intrinsic::getOrInsertDeclaration(), llvm_map_to_intrinsic_id(), Mod, unwrap(), and llvm::wrap().
LLVM_C_ABI unsigned LLVMGetIntrinsicID | ( | LLVMValueRef | Fn | ) |
Obtain the ID number from a function instance.
LLVM_C_ABI LLVMValueRef LLVMGetPersonalityFn | ( | LLVMValueRef | Fn | ) |
Obtain the personality function attached to the function.
Definition at line 2455 of file Core.cpp.
References llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetPrefixData | ( | LLVMValueRef | Fn | ) |
Gets the prefix data associated with a function.
Only valid on functions, and only if LLVMHasPrefixData returns true. See https://llvm.org/docs/LangRef.html#prefix-data
Definition at line 2548 of file Core.cpp.
References F, and llvm::wrap().
LLVM_C_ABI LLVMValueRef LLVMGetPrologueData | ( | LLVMValueRef | Fn | ) |
Gets the prologue data associated with a function.
Only valid on functions, and only if LLVMHasPrologueData returns true. See https://llvm.org/docs/LangRef.html#prologue-data
Definition at line 2564 of file Core.cpp.
References F, and llvm::wrap().
LLVM_C_ABI LLVMAttributeRef LLVMGetStringAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
const char * | K, | ||
unsigned | KLen | ||
) |
Definition at line 2604 of file Core.cpp.
References F, Idx, and llvm::wrap().
LLVM_C_ABI LLVMBool LLVMHasPersonalityFn | ( | LLVMValueRef | Fn | ) |
Check whether the given function has a personality function.
LLVM_C_ABI LLVMBool LLVMHasPrefixData | ( | LLVMValueRef | Fn | ) |
Check if a given function has prefix data.
Only valid on functions. See https://llvm.org/docs/LangRef.html#prefix-data
Definition at line 2553 of file Core.cpp.
References F.
LLVM_C_ABI LLVMBool LLVMHasPrologueData | ( | LLVMValueRef | Fn | ) |
Check if a given function has prologue data.
Only valid on functions. See https://llvm.org/docs/LangRef.html#prologue-data
Definition at line 2569 of file Core.cpp.
References F.
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName | ( | unsigned | ID, |
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount, | ||
size_t * | NameLength | ||
) |
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
Definition at line 2498 of file Core.cpp.
References llvm::Intrinsic::getNameNoUnnamedTypes(), llvm_map_to_intrinsic_id(), and unwrap().
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName2 | ( | LLVMModuleRef | Mod, |
unsigned | ID, | ||
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount, | ||
size_t * | NameLength | ||
) |
Copies the name of an overloaded intrinsic identified by a given list of parameter types.
Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the returned string.
This version also supports unnamed types.
Definition at line 2507 of file Core.cpp.
References llvm::Intrinsic::getName(), llvm_map_to_intrinsic_id(), Mod, and unwrap().
LLVM_C_ABI const char * LLVMIntrinsicGetName | ( | unsigned | ID, |
size_t * | NameLength | ||
) |
Retrieves the name of an intrinsic.
Definition at line 2484 of file Core.cpp.
References llvm::Intrinsic::getName(), and llvm_map_to_intrinsic_id().
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType | ( | LLVMContextRef | Ctx, |
unsigned | ID, | ||
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount | ||
) |
Retrieves the type of an intrinsic.
For overloaded intrinsics, parameter types must be provided to uniquely identify an overload.
Definition at line 2491 of file Core.cpp.
References llvm::Intrinsic::getType(), llvm_map_to_intrinsic_id(), unwrap(), and llvm::wrap().
LLVM_C_ABI LLVMBool LLVMIntrinsicIsOverloaded | ( | unsigned | ID | ) |
Obtain if the intrinsic identified by the given ID is overloaded.
Definition at line 2521 of file Core.cpp.
References llvm::Intrinsic::isOverloaded(), and llvm_map_to_intrinsic_id().
LLVM_C_ABI unsigned LLVMLookupIntrinsicID | ( | const char * | Name, |
size_t | NameLen | ||
) |
Obtain the intrinsic ID number which matches the given function name.
Definition at line 2517 of file Core.cpp.
References llvm::Intrinsic::lookupIntrinsicID(), and Name.
LLVM_C_ABI void LLVMRemoveEnumAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
unsigned | KindID | ||
) |
LLVM_C_ABI void LLVMRemoveStringAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
const char * | K, | ||
unsigned | KLen | ||
) |
LLVM_C_ABI void LLVMSetFunctionCallConv | ( | LLVMValueRef | Fn, |
unsigned | CC | ||
) |
Set the calling convention of a function.
Fn | Function to operate on |
CC | LLVMCallConv to set calling convention to |
LLVM_C_ABI void LLVMSetGC | ( | LLVMValueRef | Fn, |
const char * | Name | ||
) |
Define the garbage collector to use during code generation.
Definition at line 2540 of file Core.cpp.
References F.
LLVM_C_ABI void LLVMSetPersonalityFn | ( | LLVMValueRef | Fn, |
LLVMValueRef | PersonalityFn | ||
) |
Set the personality function attached to the function.
LLVM_C_ABI void LLVMSetPrefixData | ( | LLVMValueRef | Fn, |
LLVMValueRef | prefixData | ||
) |
Sets the prefix data for the function.
Only valid on functions. See https://llvm.org/docs/LangRef.html#prefix-data
Definition at line 2558 of file Core.cpp.
References F.
LLVM_C_ABI void LLVMSetPrologueData | ( | LLVMValueRef | Fn, |
LLVMValueRef | prologueData | ||
) |
Sets the prologue data for the function.
Only valid on functions. See https://llvm.org/docs/LangRef.html#prologue-data
Definition at line 2574 of file Core.cpp.
References F.