OrcRTBridge.h 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //===---- OrcRTBridge.h -- Utils for interacting with orc-rt ----*- C++ -*-===//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. //
  14. // Declares types and symbol names provided by the ORC runtime.
  15. //
  16. //===----------------------------------------------------------------------===//
  17. #ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
  18. #define LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
  19. #include "llvm/ADT/StringMap.h"
  20. #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
  21. #include "llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h"
  22. #include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
  23. namespace llvm {
  24. namespace orc {
  25. namespace rt {
  26. extern const char *SimpleExecutorDylibManagerInstanceName;
  27. extern const char *SimpleExecutorDylibManagerOpenWrapperName;
  28. extern const char *SimpleExecutorDylibManagerLookupWrapperName;
  29. extern const char *SimpleExecutorMemoryManagerInstanceName;
  30. extern const char *SimpleExecutorMemoryManagerReserveWrapperName;
  31. extern const char *SimpleExecutorMemoryManagerFinalizeWrapperName;
  32. extern const char *SimpleExecutorMemoryManagerDeallocateWrapperName;
  33. extern const char *MemoryWriteUInt8sWrapperName;
  34. extern const char *MemoryWriteUInt16sWrapperName;
  35. extern const char *MemoryWriteUInt32sWrapperName;
  36. extern const char *MemoryWriteUInt64sWrapperName;
  37. extern const char *MemoryWriteBuffersWrapperName;
  38. extern const char *RegisterEHFrameSectionWrapperName;
  39. extern const char *DeregisterEHFrameSectionWrapperName;
  40. extern const char *RunAsMainWrapperName;
  41. using SPSSimpleExecutorDylibManagerOpenSignature =
  42. shared::SPSExpected<uint64_t>(shared::SPSExecutorAddr, shared::SPSString,
  43. uint64_t);
  44. using SPSSimpleExecutorDylibManagerLookupSignature =
  45. shared::SPSExpected<shared::SPSSequence<shared::SPSExecutorAddr>>(
  46. shared::SPSExecutorAddr, uint64_t, shared::SPSRemoteSymbolLookupSet);
  47. using SPSSimpleExecutorMemoryManagerReserveSignature =
  48. shared::SPSExpected<shared::SPSExecutorAddr>(shared::SPSExecutorAddr,
  49. uint64_t);
  50. using SPSSimpleExecutorMemoryManagerFinalizeSignature =
  51. shared::SPSError(shared::SPSExecutorAddr, shared::SPSFinalizeRequest);
  52. using SPSSimpleExecutorMemoryManagerDeallocateSignature = shared::SPSError(
  53. shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
  54. using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddr,
  55. shared::SPSSequence<shared::SPSString>);
  56. } // end namespace rt
  57. } // end namespace orc
  58. } // end namespace llvm
  59. #endif // LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
  60. #ifdef __GNUC__
  61. #pragma GCC diagnostic pop
  62. #endif