LLVM 20.0.0git
|
A simple EPC server implementation. More...
#include "llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h"
Classes | |
class | Dispatcher |
Dispatches calls to runWrapper. More... | |
class | Setup |
Public Types | |
using | ReportErrorFunction = unique_function< void(Error)> |
Public Types inherited from llvm::orc::SimpleRemoteEPCTransportClient | |
enum | HandleMessageAction { ContinueSession , EndSession } |
Public Member Functions | |
void | setErrorReporter (ReportErrorFunction ReportError) |
Set an error reporter for this server. | |
Expected< HandleMessageAction > | handleMessage (SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, SimpleRemoteEPCArgBytesVector ArgBytes) override |
Call to handle an incoming message. | |
Error | waitForDisconnect () |
void | handleDisconnect (Error Err) override |
Handle a disconnection from the underlying transport. | |
Public Member Functions inherited from llvm::orc::SimpleRemoteEPCTransportClient | |
virtual | ~SimpleRemoteEPCTransportClient () |
virtual Expected< HandleMessageAction > | handleMessage (SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, SimpleRemoteEPCArgBytesVector ArgBytes)=0 |
Handle receipt of a message. | |
virtual void | handleDisconnect (Error Err)=0 |
Handle a disconnection from the underlying transport. | |
Static Public Member Functions | |
static StringMap< ExecutorAddr > | defaultBootstrapSymbols () |
template<typename TransportT , typename... TransportTCtorArgTs> | |
static Expected< std::unique_ptr< SimpleRemoteEPCServer > > | Create (unique_function< Error(Setup &S)> SetupFunction, TransportTCtorArgTs &&...TransportTCtorArgs) |
A simple EPC server implementation.
Definition at line 36 of file SimpleRemoteEPCServer.h.
Definition at line 38 of file SimpleRemoteEPCServer.h.
|
inlinestatic |
Definition at line 99 of file SimpleRemoteEPCServer.h.
References llvm::orc::SimpleRemoteEPCServer::Setup::bootstrapSymbols(), llvm::errs(), llvm::logAllUnhandledErrors(), and llvm::orc::SimpleRemoteEPCServer::Setup::services().
|
static |
Definition at line 56 of file SimpleRemoteEPCServer.cpp.
References llvm::orc::rt_bootstrap::addTo().
|
overridevirtual |
Handle a disconnection from the underlying transport.
No further messages should be sent to handleMessage after this is called. Err may contain an Error value indicating unexpected disconnection. This allows clients to log such errors, but no attempt should be made at recovery (which should be handled inside the transport class, if it is supported at all).
Implements llvm::orc::SimpleRemoteEPCTransportClient.
Definition at line 122 of file SimpleRemoteEPCServer.cpp.
References llvm::orc::shared::WrapperFunctionResult::createOutOfBandError(), llvm::joinErrors(), and std::swap().
|
overridevirtual |
Call to handle an incoming message.
Returns 'Disconnect' if the message is a 'detach' message from the remote otherwise returns 'Continue'. If the server has moved to an error state, returns an error, which should be reported and treated as a 'Disconnect'.
Implements llvm::orc::SimpleRemoteEPCTransportClient.
Definition at line 63 of file SimpleRemoteEPCServer.cpp.
References assert(), llvm::orc::CallWrapper, llvm::orc::SimpleRemoteEPCTransportClient::ContinueSession, llvm::dbgs(), llvm::orc::SimpleRemoteEPCTransportClient::EndSession, llvm::formatv(), llvm::orc::Hangup, llvm::inconvertibleErrorCode(), llvm::orc::LastOpC, LLVM_DEBUG, llvm::orc::Result, llvm::orc::Setup, and llvm::SmallVectorBase< Size_T >::size().
|
inline |
Set an error reporter for this server.
Definition at line 136 of file SimpleRemoteEPCServer.h.
Error llvm::orc::SimpleRemoteEPCServer::waitForDisconnect | ( | ) |
Definition at line 116 of file SimpleRemoteEPCServer.cpp.