OrcEE.h 2.8 KB

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