LLVM 20.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 | |
void | LLVMDeleteFunction (LLVMValueRef Fn) |
Remove a function from its containing module and deletes it. | |
LLVMBool | LLVMHasPersonalityFn (LLVMValueRef Fn) |
Check whether the given function has a personality function. | |
LLVMValueRef | LLVMGetPersonalityFn (LLVMValueRef Fn) |
Obtain the personality function attached to the function. | |
void | LLVMSetPersonalityFn (LLVMValueRef Fn, LLVMValueRef PersonalityFn) |
Set the personality function attached to the function. | |
unsigned | LLVMLookupIntrinsicID (const char *Name, size_t NameLen) |
Obtain the intrinsic ID number which matches the given function name. | |
unsigned | LLVMGetIntrinsicID (LLVMValueRef Fn) |
Obtain the ID number from a function instance. | |
LLVMValueRef | LLVMGetIntrinsicDeclaration (LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount) |
Create or insert the declaration of an intrinsic. | |
LLVMTypeRef | LLVMIntrinsicGetType (LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount) |
Retrieves the type of an intrinsic. | |
const char * | LLVMIntrinsicGetName (unsigned ID, size_t *NameLength) |
Retrieves the name of an intrinsic. | |
const char * | LLVMIntrinsicCopyOverloadedName (unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength) |
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. | |
const 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. | |
LLVMBool | LLVMIntrinsicIsOverloaded (unsigned ID) |
Obtain if the intrinsic identified by the given ID is overloaded. | |
unsigned | LLVMGetFunctionCallConv (LLVMValueRef Fn) |
Obtain the calling function of a function. | |
void | LLVMSetFunctionCallConv (LLVMValueRef Fn, unsigned CC) |
Set the calling convention of a function. | |
const char * | LLVMGetGC (LLVMValueRef Fn) |
Obtain the name of the garbage collector to use during code generation. | |
void | LLVMSetGC (LLVMValueRef Fn, const char *Name) |
Define the garbage collector to use during code generation. | |
LLVMValueRef | LLVMGetPrefixData (LLVMValueRef Fn) |
Gets the prefix data associated with a function. | |
LLVMBool | LLVMHasPrefixData (LLVMValueRef Fn) |
Check if a given function has prefix data. | |
void | LLVMSetPrefixData (LLVMValueRef Fn, LLVMValueRef prefixData) |
Sets the prefix data for the function. | |
LLVMValueRef | LLVMGetPrologueData (LLVMValueRef Fn) |
Gets the prologue data associated with a function. | |
LLVMBool | LLVMHasPrologueData (LLVMValueRef Fn) |
Check if a given function has prologue data. | |
void | LLVMSetPrologueData (LLVMValueRef Fn, LLVMValueRef prologueData) |
Sets the prologue data for the function. | |
void | LLVMAddAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A) |
Add an attribute to a function. | |
unsigned | LLVMGetAttributeCountAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx) |
void | LLVMGetAttributesAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs) |
LLVMAttributeRef | LLVMGetEnumAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID) |
LLVMAttributeRef | LLVMGetStringAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen) |
void | LLVMRemoveEnumAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID) |
void | LLVMRemoveStringAttributeAtIndex (LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen) |
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.
void LLVMAddAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
LLVMAttributeRef | A | ||
) |
void LLVMAddTargetDependentFunctionAttr | ( | LLVMValueRef | Fn, |
const char * | A, | ||
const char * | V | ||
) |
Add a target-dependent attribute to a function.
Definition at line 2611 of file Core.cpp.
References A, and llvm::Attribute::get().
void LLVMDeleteFunction | ( | LLVMValueRef | Fn | ) |
Remove a function from its containing module and deletes it.
unsigned LLVMGetAttributeCountAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx | ||
) |
void LLVMGetAttributesAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
LLVMAttributeRef * | Attrs | ||
) |
LLVMAttributeRef LLVMGetEnumAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
unsigned | KindID | ||
) |
Definition at line 2587 of file Core.cpp.
References F, Idx, and llvm::wrap().
unsigned LLVMGetFunctionCallConv | ( | LLVMValueRef | Fn | ) |
Obtain the calling function of a function.
The returned value corresponds to the LLVMCallConv enumeration.
const char * LLVMGetGC | ( | LLVMValueRef | Fn | ) |
Obtain the name of the garbage collector to use during code generation.
Definition at line 2525 of file Core.cpp.
References F.
LLVMValueRef LLVMGetIntrinsicDeclaration | ( | LLVMModuleRef | Mod, |
unsigned | ID, | ||
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount | ||
) |
Create or insert the declaration of an intrinsic.
For overloaded intrinsics, parameter types must be provided to uniquely identify an overload.
Definition at line 2462 of file Core.cpp.
References llvm::Intrinsic::getDeclaration(), llvm_map_to_intrinsic_id(), Mod, unwrap(), and llvm::wrap().
unsigned LLVMGetIntrinsicID | ( | LLVMValueRef | Fn | ) |
Obtain the ID number from a function instance.
LLVMValueRef LLVMGetPersonalityFn | ( | LLVMValueRef | Fn | ) |
Obtain the personality function attached to the function.
Definition at line 2443 of file Core.cpp.
References llvm::wrap().
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 2538 of file Core.cpp.
References F, and llvm::wrap().
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 2554 of file Core.cpp.
References F, and llvm::wrap().
LLVMAttributeRef LLVMGetStringAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
const char * | K, | ||
unsigned | KLen | ||
) |
Definition at line 2594 of file Core.cpp.
References F, Idx, and llvm::wrap().
LLVMBool LLVMHasPersonalityFn | ( | LLVMValueRef | Fn | ) |
Check whether the given function has a personality function.
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 2543 of file Core.cpp.
References F.
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 2559 of file Core.cpp.
References F.
const char * LLVMIntrinsicCopyOverloadedName | ( | unsigned | ID, |
LLVMTypeRef * | ParamTypes, | ||
size_t | ParamCount, | ||
size_t * | NameLength | ||
) |
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
Definition at line 2485 of file Core.cpp.
References llvm::Intrinsic::getNameNoUnnamedTypes(), llvm_map_to_intrinsic_id(), and unwrap().
const 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 2496 of file Core.cpp.
References llvm::Intrinsic::getName(), llvm_map_to_intrinsic_id(), Mod, and unwrap().
Retrieves the name of an intrinsic.
Definition at line 2471 of file Core.cpp.
References llvm::Intrinsic::getName(), and llvm_map_to_intrinsic_id().
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 2478 of file Core.cpp.
References llvm::Intrinsic::getType(), llvm_map_to_intrinsic_id(), unwrap(), and llvm::wrap().
Obtain if the intrinsic identified by the given ID is overloaded.
Definition at line 2511 of file Core.cpp.
References llvm::Intrinsic::isOverloaded(), and llvm_map_to_intrinsic_id().
Obtain the intrinsic ID number which matches the given function name.
Definition at line 2507 of file Core.cpp.
References llvm::Function::lookupIntrinsicID(), and Name.
void LLVMRemoveEnumAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
unsigned | KindID | ||
) |
void LLVMRemoveStringAttributeAtIndex | ( | LLVMValueRef | F, |
LLVMAttributeIndex | Idx, | ||
const char * | K, | ||
unsigned | KLen | ||
) |
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 |
Definition at line 2520 of file Core.cpp.
References CC.
void LLVMSetGC | ( | LLVMValueRef | Fn, |
const char * | Name | ||
) |
Define the garbage collector to use during code generation.
Definition at line 2530 of file Core.cpp.
References F.
void LLVMSetPersonalityFn | ( | LLVMValueRef | Fn, |
LLVMValueRef | PersonalityFn | ||
) |
Set the personality function attached to the function.
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 2548 of file Core.cpp.
References F.
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 2564 of file Core.cpp.
References F.