LLVM  15.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
llvm::orc::SimpleRemoteEPCServer Class Reference

A simple EPC server implementation. More...

#include "llvm/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.h"

Inheritance diagram for llvm::orc::SimpleRemoteEPCServer:
Inheritance graph
Collaboration diagram for llvm::orc::SimpleRemoteEPCServer:
Collaboration graph


class  Dispatcher
 Dispatches calls to runWrapper. More...
class  Setup
class  ThreadDispatcher

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. More...
Expected< HandleMessageActionhandleMessage (SimpleRemoteEPCOpcode OpC, uint64_t SeqNo, ExecutorAddr TagAddr, SimpleRemoteEPCArgBytesVector ArgBytes) override
 Call to handle an incoming message. More...
Error waitForDisconnect ()
void handleDisconnect (Error Err) override
 Handle a disconnection from the underlying transport. More...
- Public Member Functions inherited from llvm::orc::SimpleRemoteEPCTransportClient
virtual ~SimpleRemoteEPCTransportClient ()

Static Public Member Functions

static StringMap< ExecutorAddrdefaultBootstrapSymbols ()
template<typename TransportT , typename... TransportTCtorArgTs>
static Expected< std::unique_ptr< SimpleRemoteEPCServer > > Create (unique_function< Error(Setup &S)> SetupFunction, TransportTCtorArgTs &&...TransportTCtorArgs)

Detailed Description

A simple EPC server implementation.

Definition at line 36 of file SimpleRemoteEPCServer.h.

Member Typedef Documentation

◆ ReportErrorFunction

Definition at line 38 of file SimpleRemoteEPCServer.h.

Member Function Documentation

◆ Create()

template<typename TransportT , typename... TransportTCtorArgTs>
static Expected<std::unique_ptr<SimpleRemoteEPCServer> > llvm::orc::SimpleRemoteEPCServer::Create ( unique_function< Error(Setup &S)>  SetupFunction,
TransportTCtorArgTs &&...  TransportTCtorArgs 

Definition at line 87 of file SimpleRemoteEPCServer.h.

References S.

◆ defaultBootstrapSymbols()

StringMap< ExecutorAddr > llvm::orc::SimpleRemoteEPCServer::defaultBootstrapSymbols ( )

Definition at line 54 of file SimpleRemoteEPCServer.cpp.

References llvm::orc::rt_bootstrap::addTo().

◆ handleDisconnect()

void llvm::orc::SimpleRemoteEPCServer::handleDisconnect ( Error  Err)

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 121 of file SimpleRemoteEPCServer.cpp.

◆ handleMessage()

Expected< SimpleRemoteEPCTransportClient::HandleMessageAction > llvm::orc::SimpleRemoteEPCServer::handleMessage ( SimpleRemoteEPCOpcode  OpC,
uint64_t  SeqNo,
ExecutorAddr  TagAddr,
SimpleRemoteEPCArgBytesVector  ArgBytes 

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 61 of file SimpleRemoteEPCServer.cpp.

References assert(), llvm::orc::CallWrapper, llvm::dbgs(), llvm::orc::SimpleRemoteEPCTransportClient::EndSession, llvm::formatv(), llvm::orc::ExecutorAddr::getValue(), llvm::orc::Hangup, llvm::inconvertibleErrorCode(), llvm::orc::LastOpC, LLVM_DEBUG, llvm::orc::Result, and llvm::orc::Setup.

◆ setErrorReporter()

void llvm::orc::SimpleRemoteEPCServer::setErrorReporter ( ReportErrorFunction  ReportError)

Set an error reporter for this server.

Definition at line 123 of file SimpleRemoteEPCServer.h.

References move.

◆ waitForDisconnect()

Error llvm::orc::SimpleRemoteEPCServer::waitForDisconnect ( )

Definition at line 115 of file SimpleRemoteEPCServer.cpp.

References llvm::Lock, and move.

The documentation for this class was generated from the following files: