ΒΆLLVMOrcMaterializationUnitRef
LLVMOrcCreateCustomMaterializationUnit(
const char* Name,
void* Ctx,
LLVMOrcCSymbolFlagsMapPairs Syms,
size_t NumSyms,
LLVMOrcSymbolStringPoolEntryRef InitSym,
LLVMOrcMaterializationUnitMaterializeFunction
Materialize,
LLVMOrcMaterializationUnitDiscardFunction
Discard,
LLVMOrcMaterializationUnitDestroyFunction
Destroy)
LLVMOrcMaterializationUnitRef
LLVMOrcCreateCustomMaterializationUnit(
const char* Name,
void* Ctx,
LLVMOrcCSymbolFlagsMapPairs Syms,
size_t NumSyms,
LLVMOrcSymbolStringPoolEntryRef InitSym,
LLVMOrcMaterializationUnitMaterializeFunction
Materialize,
LLVMOrcMaterializationUnitDiscardFunction
Discard,
LLVMOrcMaterializationUnitDestroyFunction
Destroy)
Description
Create a custom MaterializationUnit. Name is a name for this MaterializationUnit to be used for identification and logging purposes (e.g. if this MaterializationUnit produces an object buffer then the name of that buffer will be derived from this name). The Syms list contains the names and linkages of the symbols provided by this unit. This function takes ownership of the elements of the Syms array. The Name fields of the array elements are taken to have been retained for this function. The client should *not* release the elements of the array, but is still responsible for destroying the array itself. The InitSym argument indicates whether or not this MaterializationUnit contains static initializers. If three are no static initializers (the common case) then this argument should be null. If there are static initializers then InitSym should be set to a unique name that also appears in the Syms list with the LLVMJITSymbolGenericFlagsMaterializationSideEffectsOnly flag set. This function takes ownership of the InitSym, which should have been retained twice on behalf of this function: once for the Syms entry and once for InitSym. If clients wish to use the InitSym value after this function returns they must retain it once more for themselves. If any of the symbols in the Syms list is looked up then the Materialize function will be called. If any of the symbols in the Syms list is overridden then the Discard function will be called. The caller owns the underling MaterializationUnit and is responsible for either passing it to a JITDylib (via LLVMOrcJITDylibDefine) or disposing of it by calling LLVMOrcDisposeMaterializationUnit.
Declared at: llvm/include/llvm-c/Orc.h:654
Parameters
- const char* Name
- void* Ctx
- LLVMOrcCSymbolFlagsMapPairs Syms
- size_t NumSyms
- LLVMOrcSymbolStringPoolEntryRef InitSym
- LLVMOrcMaterializationUnitMaterializeFunction Materialize
- LLVMOrcMaterializationUnitDiscardFunction Discard
- LLVMOrcMaterializationUnitDestroyFunction Destroy