1 //===---- OrcRTBridge.h -- Utils for interacting with orc-rt ----*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // Declares types and symbol names provided by the ORC runtime.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
14 #define LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H
16 #include "llvm/ADT/StringMap.h"
17 #include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
18 #include "llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h"
19 #include "llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h"
25 extern const char *SimpleExecutorDylibManagerInstanceName;
26 extern const char *SimpleExecutorDylibManagerOpenWrapperName;
27 extern const char *SimpleExecutorDylibManagerLookupWrapperName;
29 extern const char *SimpleExecutorMemoryManagerInstanceName;
30 extern const char *SimpleExecutorMemoryManagerReserveWrapperName;
31 extern const char *SimpleExecutorMemoryManagerFinalizeWrapperName;
32 extern const char *SimpleExecutorMemoryManagerDeallocateWrapperName;
34 extern const char *ExecutorSharedMemoryMapperServiceInstanceName;
35 extern const char *ExecutorSharedMemoryMapperServiceReserveWrapperName;
36 extern const char *ExecutorSharedMemoryMapperServiceInitializeWrapperName;
37 extern const char *ExecutorSharedMemoryMapperServiceDeinitializeWrapperName;
38 extern const char *ExecutorSharedMemoryMapperServiceReleaseWrapperName;
40 extern const char *MemoryWriteUInt8sWrapperName;
41 extern const char *MemoryWriteUInt16sWrapperName;
42 extern const char *MemoryWriteUInt32sWrapperName;
43 extern const char *MemoryWriteUInt64sWrapperName;
44 extern const char *MemoryWriteBuffersWrapperName;
46 extern const char *RegisterEHFrameSectionWrapperName;
47 extern const char *DeregisterEHFrameSectionWrapperName;
49 extern const char *RunAsMainWrapperName;
51 using SPSSimpleExecutorDylibManagerOpenSignature =
52 shared::SPSExpected<uint64_t>(shared::SPSExecutorAddr, shared::SPSString,
55 using SPSSimpleExecutorDylibManagerLookupSignature =
56 shared::SPSExpected<shared::SPSSequence<shared::SPSExecutorAddr>>(
57 shared::SPSExecutorAddr, uint64_t, shared::SPSRemoteSymbolLookupSet);
59 using SPSSimpleExecutorMemoryManagerReserveSignature =
60 shared::SPSExpected<shared::SPSExecutorAddr>(shared::SPSExecutorAddr,
62 using SPSSimpleExecutorMemoryManagerFinalizeSignature =
63 shared::SPSError(shared::SPSExecutorAddr, shared::SPSFinalizeRequest);
64 using SPSSimpleExecutorMemoryManagerDeallocateSignature = shared::SPSError(
65 shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
67 // ExecutorSharedMemoryMapperService
68 using SPSExecutorSharedMemoryMapperServiceReserveSignature =
70 shared::SPSTuple<shared::SPSExecutorAddr, shared::SPSString>>(
71 shared::SPSExecutorAddr, uint64_t);
72 using SPSExecutorSharedMemoryMapperServiceInitializeSignature =
73 shared::SPSExpected<shared::SPSExecutorAddr>(
74 shared::SPSExecutorAddr, shared::SPSExecutorAddr,
75 shared::SPSSharedMemoryFinalizeRequest);
76 using SPSExecutorSharedMemoryMapperServiceDeinitializeSignature =
77 shared::SPSError(shared::SPSExecutorAddr,
78 shared::SPSSequence<shared::SPSExecutorAddr>);
79 using SPSExecutorSharedMemoryMapperServiceReleaseSignature = shared::SPSError(
80 shared::SPSExecutorAddr, shared::SPSSequence<shared::SPSExecutorAddr>);
82 using SPSRunAsMainSignature = int64_t(shared::SPSExecutorAddr,
83 shared::SPSSequence<shared::SPSString>);
86 } // end namespace orc
87 } // end namespace llvm
89 #endif // LLVM_EXECUTIONENGINE_ORC_SHARED_ORCRTBRIDGE_H