1use super::*;
2use crate::execution_engine::*;
3
4pub type LLVMMemoryManagerCreateContextCallback =
5 extern "C" fn(CtxCtx: *mut ::libc::c_void) -> *mut ::libc::c_void;
6pub type LLVMMemoryManagerNotifyTerminatingCallback = extern "C" fn(CtxCtx: *mut ::libc::c_void);
7
8extern "C" {
9 pub fn LLVMOrcCreateObjectLinkingLayerWithInProcessMemoryManager(
12 Result: *mut LLVMOrcObjectLayerRef,
13 ES: LLVMOrcExecutionSessionRef,
14 ) -> LLVMErrorRef;
15 pub fn LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(
16 ES: LLVMOrcExecutionSessionRef,
17 ) -> LLVMOrcObjectLayerRef;
18 pub fn LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManagerReserveAlloc(
22 ES: LLVMOrcExecutionSessionRef,
23 ReserveAlloc: LLVMBool,
24 ) -> LLVMOrcObjectLayerRef;
25 pub fn LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(
26 ES: LLVMOrcExecutionSessionRef,
27 CreateContextCtx: *mut ::libc::c_void,
28 CreateContext: LLVMMemoryManagerCreateContextCallback,
29 NotifyTerminating: LLVMMemoryManagerNotifyTerminatingCallback,
30 AllocateCodeSection: LLVMMemoryManagerAllocateCodeSectionCallback,
31 AllocateDataSection: LLVMMemoryManagerAllocateDataSectionCallback,
32 FinalizeMemory: LLVMMemoryManagerFinalizeMemoryCallback,
33 Destroy: LLVMMemoryManagerDestroyCallback,
34 ) -> LLVMOrcObjectLayerRef;
35 pub fn LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(
36 RTDyldObjLinkingLayer: LLVMOrcObjectLayerRef,
37 Listener: LLVMJITEventListenerRef,
38 );
39}