15#ifndef LLVM_EXECUTIONENGINE_ORC_INPROCESSEPC_H
16#define LLVM_EXECUTIONENGINE_ORC_INPROCESSEPC_H
69 const char *(*GetTargetTriple)(
void *BIA) =
nullptr;
71 int (*
GetNextValue)(
void *BIA,
const char **Name,
const char **ValueBytes,
83 std::shared_ptr<SymbolStringPool>
SSP =
nullptr,
84 std::unique_ptr<TaskDispatcher>
D =
nullptr);
109 InProcessEPC(
Connection *C, std::shared_ptr<SymbolStringPool>
SSP,
110 std::unique_ptr<TaskDispatcher>
D)
115 uint64_t registerPendingCallWrapperResult(IncomingWFRHandler
H);
119 void callJITDispatch(
uint64_t CallId,
void *HandlerTag,
121 static void callJITDispatchEntry(
void *IPEPC,
uint64_t CallId,
126 void returnWrapperResult(
uint64_t CallId,
129 returnWrapperResultEntry(
void *IPEPC,
uint64_t CallId,
This file defines the DenseMap class.
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Represents an address in the executor process.
A handler or incoming WrapperFunctionBuffers – either return values from callWrapper* calls,...
std::unique_ptr< TaskDispatcher > D
std::shared_ptr< SymbolStringPool > SSP
ExecutorProcessControl(std::shared_ptr< SymbolStringPool > SSP, std::unique_ptr< TaskDispatcher > D)
Expected< std::unique_ptr< jitlink::JITLinkMemoryManager > > createDefaultMemoryManager() override
Create a default JITLinkMemoryManager for the target process.
Expected< int32_t > runAsIntFunction(ExecutorAddr IntFnAddr, int Arg) override
Run function with a int (*)(int) signature.
Expected< int32_t > runAsVoidFunction(ExecutorAddr VoidFnAddr) override
Run function with a int (*)(void) signature.
Expected< std::unique_ptr< DylibManager > > createDefaultDylibMgr() override
Create a default DylibManager for the target process.
void callWrapperAsync(ExecutorAddr WrapperFnAddr, IncomingWFRHandler OnComplete, ArrayRef< char > ArgBuffer) override
Run a wrapper function in the executor.
static Expected< std::unique_ptr< InProcessEPC > > Create(Connection *C, BootstrapInfoAccess *BIA, std::shared_ptr< SymbolStringPool > SSP=nullptr, std::unique_ptr< TaskDispatcher > D=nullptr)
Create a new InProcessEPC.
Error disconnect() override
Disconnect from the target process.
Expected< std::unique_ptr< MemoryAccess > > createDefaultMemoryAccess() override
Create a default MemoryAccess for the target process.
Expected< int32_t > runAsMain(ExecutorAddr MainFnAddr, ArrayRef< std::string > Args) override
Run function with a main-like signature.
@ C
The default llvm calling convention, compatible with C.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Provides access to bootstrap info.
uint64_t(* GetPageSize)(void *BIA)
int(* GetNextSymbol)(void *BIA, const char **Name, uint64_t *Addr)
int(* GetNextValue)(void *BIA, const char **Name, const char **ValueBytes, uint64_t *ValueSize)
Pseudo-connection C struct.
void(* ReturnWrapperResult)(void *IPEPC, uint64_t CallId, shared::CWrapperFunctionBuffer ResultBytes)
int(* EnterMessageScope)(Connection *C)
void(* ReturnJITDispatchResult)(void *IPCA, uint64_t CallId, shared::CWrapperFunctionBuffer ResultBytes)
void * IPCA
Accessors to be set by the InProcessControllerAccess instance.
void(* CallJITDispatch)(void *IPEPC, uint64_t CallId, void *HandlerTag, shared::CWrapperFunctionBuffer ArgBytes)
void * IPEPC
Accessors to be set by the InProcessEPC instance.
void(* CallWrapper)(void *IPCA, uint64_t CallId, void *Fn, shared::CWrapperFunctionBuffer ArgBytes)
void(* Release)(Connection *C)
void(* Disconnect)(Connection *C)
void(* LeaveMessageScope)(Connection *C)
void(* Retain)(Connection *C)