Class LLVMOrcEE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classContains the function pointers loaded fromLLVMCore.getLibrary(). -
Method Summary
Modifier and TypeMethodDescriptionstatic longLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, LLVMMemoryManagerCreateContextCallbackI CreateContext, LLVMMemoryManagerNotifyTerminatingCallbackI NotifyTerminating, LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory, LLVMMemoryManagerDestroyCallbackI Destroy) Create aRTDyldObjectLinkingLayerinstance using MCJIT-memory-manager-like callbacks.static longCreate aRTDyldObjectLinkingLayerinstance using the standardSectionMemoryManagerfor memory management.static voidLLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(long RTDyldObjLinkingLayer, long Listener) Add the given listener to the givenRTDyldObjectLinkingLayer.static longnLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, long CreateContext, long NotifyTerminating, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy) Unsafe version of:OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks
-
Method Details
-
LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager
public static long LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(long ES) Create aRTDyldObjectLinkingLayerinstance using the standardSectionMemoryManagerfor memory management. -
nLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks
public static long nLLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, long CreateContext, long NotifyTerminating, long AllocateCodeSection, long AllocateDataSection, long FinalizeMemory, long Destroy) Unsafe version of:OrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks -
LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks
public static long LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(long ES, long CreateContextCtx, LLVMMemoryManagerCreateContextCallbackI CreateContext, LLVMMemoryManagerNotifyTerminatingCallbackI NotifyTerminating, LLVMMemoryManagerAllocateCodeSectionCallbackI AllocateCodeSection, LLVMMemoryManagerAllocateDataSectionCallbackI AllocateDataSection, LLVMMemoryManagerFinalizeMemoryCallbackI FinalizeMemory, LLVMMemoryManagerDestroyCallbackI Destroy) Create aRTDyldObjectLinkingLayerinstance using MCJIT-memory-manager-like callbacks.This is intended to simplify transitions for existing MCJIT clients. The callbacks used are similar (but not identical) to the callbacks for
CreateSimpleMCJITMemoryManager): Unlike MCJIT,RTDyldObjectLinkingLayerwill create a new memory manager for each object linked by calling the givenCreateContextcallback. This allows for code removal by destroying each allocator individually. Every allocator will be destroyed (if it has not been already) atRTDyldObjectLinkingLayerdestruction time, and theNotifyTerminatingcallback will be called to indicate that no further allocation contexts will be created.To implement MCJIT-like behavior clients can implement
CreateContext,NotifyTerminating, andDestroyas:void *CreateContext(void *CtxCtx) { return CtxCtx; } void NotifyTerminating(void *CtxCtx) { MyOriginalDestroy(CtxCtx); } void Destroy(void *Ctx) { }This scheme simply reuses the
CreateContextCtxpointer as the one-and-only allocation context. -
LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener
public static void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(long RTDyldObjLinkingLayer, long Listener) Add the given listener to the givenRTDyldObjectLinkingLayer.Note: Layer must be an
RTDyldObjectLinkingLayerinstance or behavior is undefined.
-