1e8d8bef9SDimitry Andric /*===-- llvm-c/OrcEE.h - OrcV2 C bindings ExecutionEngine utils -*- C++ -*-===*\ 2e8d8bef9SDimitry Andric |* *| 3e8d8bef9SDimitry Andric |* Part of the LLVM Project, under the Apache License v2.0 with LLVM *| 4e8d8bef9SDimitry Andric |* Exceptions. *| 5e8d8bef9SDimitry Andric |* See https://llvm.org/LICENSE.txt for license information. *| 6e8d8bef9SDimitry Andric |* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *| 7e8d8bef9SDimitry Andric |* *| 8e8d8bef9SDimitry Andric |*===----------------------------------------------------------------------===*| 9e8d8bef9SDimitry Andric |* *| 10e8d8bef9SDimitry Andric |* This header declares the C interface to ExecutionEngine based utils, e.g. *| 11e8d8bef9SDimitry Andric |* RTDyldObjectLinkingLayer (based on RuntimeDyld) in Orc. *| 12e8d8bef9SDimitry Andric |* *| 13e8d8bef9SDimitry Andric |* Many exotic languages can interoperate with C code but have a harder time *| 14e8d8bef9SDimitry Andric |* with C++ due to name mangling. So in addition to C, this interface enables *| 15e8d8bef9SDimitry Andric |* tools written in such languages. *| 16e8d8bef9SDimitry Andric |* *| 17e8d8bef9SDimitry Andric |* Note: This interface is experimental. It is *NOT* stable, and may be *| 18e8d8bef9SDimitry Andric |* changed without warning. Only C API usage documentation is *| 19e8d8bef9SDimitry Andric |* provided. See the C++ documentation for all higher level ORC API *| 20e8d8bef9SDimitry Andric |* details. *| 21e8d8bef9SDimitry Andric |* *| 22e8d8bef9SDimitry Andric \*===----------------------------------------------------------------------===*/ 23e8d8bef9SDimitry Andric 24e8d8bef9SDimitry Andric #ifndef LLVM_C_ORCEE_H 25e8d8bef9SDimitry Andric #define LLVM_C_ORCEE_H 26e8d8bef9SDimitry Andric 27e8d8bef9SDimitry Andric #include "llvm-c/Error.h" 28e8d8bef9SDimitry Andric #include "llvm-c/ExecutionEngine.h" 29e8d8bef9SDimitry Andric #include "llvm-c/Orc.h" 30e8d8bef9SDimitry Andric #include "llvm-c/TargetMachine.h" 31e8d8bef9SDimitry Andric #include "llvm-c/Types.h" 32e8d8bef9SDimitry Andric 33e8d8bef9SDimitry Andric LLVM_C_EXTERN_C_BEGIN 34e8d8bef9SDimitry Andric 35e8d8bef9SDimitry Andric /** 36*349cc55cSDimitry Andric * @defgroup LLVMCExecutionEngineORCEE ExecutionEngine-based ORC Utils 37*349cc55cSDimitry Andric * @ingroup LLVMCExecutionEngine 38*349cc55cSDimitry Andric * 39*349cc55cSDimitry Andric * @{ 40*349cc55cSDimitry Andric */ 41*349cc55cSDimitry Andric 42*349cc55cSDimitry Andric /** 43e8d8bef9SDimitry Andric * Create a RTDyldObjectLinkingLayer instance using the standard 44e8d8bef9SDimitry Andric * SectionMemoryManager for memory management. 45e8d8bef9SDimitry Andric */ 46e8d8bef9SDimitry Andric LLVMOrcObjectLayerRef 47e8d8bef9SDimitry Andric LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager( 48e8d8bef9SDimitry Andric LLVMOrcExecutionSessionRef ES); 49e8d8bef9SDimitry Andric 50e8d8bef9SDimitry Andric /** 51e8d8bef9SDimitry Andric * Add the given listener to the given RTDyldObjectLinkingLayer. 52e8d8bef9SDimitry Andric * 53e8d8bef9SDimitry Andric * Note: Layer must be an RTDyldObjectLinkingLayer instance or 54e8d8bef9SDimitry Andric * behavior is undefined. 55e8d8bef9SDimitry Andric */ 56e8d8bef9SDimitry Andric void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener( 57e8d8bef9SDimitry Andric LLVMOrcObjectLayerRef RTDyldObjLinkingLayer, 58e8d8bef9SDimitry Andric LLVMJITEventListenerRef Listener); 59e8d8bef9SDimitry Andric 60*349cc55cSDimitry Andric /** 61*349cc55cSDimitry Andric * @} 62*349cc55cSDimitry Andric */ 63*349cc55cSDimitry Andric 64e8d8bef9SDimitry Andric LLVM_C_EXTERN_C_END 65e8d8bef9SDimitry Andric 66e8d8bef9SDimitry Andric #endif /* LLVM_C_ORCEE_H */ 67