OrcEE.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. * Create a RTDyldObjectLinkingLayer instance using the standard
  38. * SectionMemoryManager for memory management.
  39. */
  40. LLVMOrcObjectLayerRef
  41. LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(
  42. LLVMOrcExecutionSessionRef ES);
  43. /**
  44. * Add the given listener to the given RTDyldObjectLinkingLayer.
  45. *
  46. * Note: Layer must be an RTDyldObjectLinkingLayer instance or
  47. * behavior is undefined.
  48. */
  49. void LLVMOrcRTDyldObjectLinkingLayerRegisterJITEventListener(
  50. LLVMOrcObjectLayerRef RTDyldObjLinkingLayer,
  51. LLVMJITEventListenerRef Listener);
  52. LLVM_C_EXTERN_C_END
  53. #endif /* LLVM_C_ORCEE_H */
  54. #ifdef __GNUC__
  55. #pragma GCC diagnostic pop
  56. #endif