LLVM 19.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::orc::ExecutionSession Class Reference

An ExecutionSession represents a running JIT program. More...

#include "llvm/ExecutionEngine/Orc/Core.h"

Public Types

using ErrorReporter = std::function< void(Error)>
 For reporting errors.
 
using SendResultFunction = unique_function< void(shared::WrapperFunctionResult)>
 Send a result to the remote.
 
using DispatchTaskFunction = unique_function< void(std::unique_ptr< Task > T)>
 For dispatching ORC tasks (typically materialization tasks).
 
using JITDispatchHandlerFunction = unique_function< void(SendResultFunction SendResult, const char *ArgData, size_t ArgSize)>
 An asynchronous wrapper-function callable from the executor via jit-dispatch.
 
using JITDispatchHandlerAssociationMap = DenseMap< SymbolStringPtr, JITDispatchHandlerFunction >
 A map associating tag names with asynchronous wrapper function implementations in the JIT.
 

Public Member Functions

 ExecutionSession (std::unique_ptr< ExecutorProcessControl > EPC)
 Construct an ExecutionSession with the given ExecutorProcessControl object.
 
 ~ExecutionSession ()
 Destroy an ExecutionSession.
 
Error endSession ()
 End the session.
 
ExecutorProcessControlgetExecutorProcessControl ()
 Get the ExecutorProcessControl object associated with this ExecutionSession.
 
const TriplegetTargetTriple () const
 Return the triple for the executor.
 
size_t getPageSize () const
 
std::shared_ptr< SymbolStringPoolgetSymbolStringPool ()
 Get the SymbolStringPool for this instance.
 
SymbolStringPtr intern (StringRef SymName)
 Add a symbol name to the SymbolStringPool and return a pointer to it.
 
void setPlatform (std::unique_ptr< Platform > P)
 Set the Platform for this ExecutionSession.
 
PlatformgetPlatform ()
 Get the Platform for this session.
 
template<typename Func >
decltype(auto) runSessionLocked (Func &&F)
 Run the given lambda with the session mutex locked.
 
void registerResourceManager (ResourceManager &RM)
 Register the given ResourceManager with this ExecutionSession.
 
void deregisterResourceManager (ResourceManager &RM)
 Deregister the given ResourceManager with this ExecutionSession.
 
JITDylibgetJITDylibByName (StringRef Name)
 Return a pointer to the "name" JITDylib.
 
JITDylibcreateBareJITDylib (std::string Name)
 Add a new bare JITDylib to this ExecutionSession.
 
Expected< JITDylib & > createJITDylib (std::string Name)
 Add a new JITDylib to this ExecutionSession.
 
Error removeJITDylibs (std::vector< JITDylibSP > JDsToRemove)
 Removes the given JITDylibs from the ExecutionSession.
 
Error removeJITDylib (JITDylib &JD)
 Calls removeJTIDylibs on the gives JITDylib.
 
ExecutionSessionsetErrorReporter (ErrorReporter ReportError)
 Set the error reporter function.
 
void reportError (Error Err)
 Report a error for this execution session.
 
ExecutionSessionsetDispatchTask (DispatchTaskFunction DispatchTask)
 Set the task dispatch function.
 
void lookupFlags (LookupKind K, JITDylibSearchOrder SearchOrder, SymbolLookupSet Symbols, unique_function< void(Expected< SymbolFlagsMap >)> OnComplete)
 Search the given JITDylibs to find the flags associated with each of the given symbols.
 
Expected< SymbolFlagsMaplookupFlags (LookupKind K, JITDylibSearchOrder SearchOrder, SymbolLookupSet Symbols)
 Blocking version of lookupFlags.
 
void lookup (LookupKind K, const JITDylibSearchOrder &SearchOrder, SymbolLookupSet Symbols, SymbolState RequiredState, SymbolsResolvedCallback NotifyComplete, RegisterDependenciesFunction RegisterDependencies)
 Search the given JITDylibs for the given symbols.
 
Expected< SymbolMaplookup (const JITDylibSearchOrder &SearchOrder, SymbolLookupSet Symbols, LookupKind K=LookupKind::Static, SymbolState RequiredState=SymbolState::Ready, RegisterDependenciesFunction RegisterDependencies=NoDependenciesToRegister)
 Blocking version of lookup above.
 
Expected< ExecutorSymbolDeflookup (const JITDylibSearchOrder &SearchOrder, SymbolStringPtr Symbol, SymbolState RequiredState=SymbolState::Ready)
 Convenience version of blocking lookup.
 
Expected< ExecutorSymbolDeflookup (ArrayRef< JITDylib * > SearchOrder, SymbolStringPtr Symbol, SymbolState RequiredState=SymbolState::Ready)
 Convenience version of blocking lookup.
 
Expected< ExecutorSymbolDeflookup (ArrayRef< JITDylib * > SearchOrder, StringRef Symbol, SymbolState RequiredState=SymbolState::Ready)
 Convenience version of blocking lookup.
 
void dispatchTask (std::unique_ptr< Task > T)
 Materialize the given unit.
 
template<typename... ArgTs>
void callWrapperAsync (ArgTs &&... Args)
 Run a wrapper function in the executor.
 
shared::WrapperFunctionResult callWrapper (ExecutorAddr WrapperFnAddr, ArrayRef< char > ArgBuffer)
 Run a wrapper function in the executor.
 
template<typename SPSSignature , typename SendResultT , typename... ArgTs>
void callSPSWrapperAsync (ExecutorAddr WrapperFnAddr, SendResultT &&SendResult, const ArgTs &...Args)
 Run a wrapper function using SPS to serialize the arguments and deserialize the results.
 
template<typename SPSSignature , typename... WrapperCallArgTs>
Error callSPSWrapper (ExecutorAddr WrapperFnAddr, WrapperCallArgTs &&...WrapperCallArgs)
 Run a wrapper function using SPS to serialize the arguments and deserialize the results.
 
Error registerJITDispatchHandlers (JITDylib &JD, JITDispatchHandlerAssociationMap WFs)
 For each tag symbol name, associate the corresponding AsyncHandlerWrapperFunction with the address of that symbol.
 
void runJITDispatchHandler (SendResultFunction SendResult, ExecutorAddr HandlerFnTagAddr, ArrayRef< char > ArgBuffer)
 Run a registered jit-side wrapper function.
 
void dump (raw_ostream &OS)
 Dump the state of all the JITDylibs in this session.
 

Static Public Member Functions

template<typename SPSSignature , typename HandlerT >
static JITDispatchHandlerFunction wrapAsyncWithSPS (HandlerT &&H)
 Wrap a handler that takes concrete argument types (and a sender for a concrete return type) to produce an AsyncHandlerWrapperFunction.
 
template<typename SPSSignature , typename ClassT , typename... MethodArgTs>
static JITDispatchHandlerFunction wrapAsyncWithSPS (ClassT *Instance, void(ClassT::*Method)(MethodArgTs...))
 Wrap a class method that takes concrete argument types (and a sender for a concrete return type) to produce an AsyncHandlerWrapperFunction.
 

Friends

class InProgressLookupFlagsState
 
class InProgressFullLookupState
 
class JITDylib
 
class LookupState
 
class MaterializationResponsibility
 
class ResourceTracker
 

Detailed Description

An ExecutionSession represents a running JIT program.

Definition at line 1425 of file Core.h.

Member Typedef Documentation

◆ DispatchTaskFunction

For dispatching ORC tasks (typically materialization tasks).

Definition at line 1441 of file Core.h.

◆ ErrorReporter

using llvm::orc::ExecutionSession::ErrorReporter = std::function<void(Error)>

For reporting errors.

Definition at line 1435 of file Core.h.

◆ JITDispatchHandlerAssociationMap

A map associating tag names with asynchronous wrapper function implementations in the JIT.

Definition at line 1451 of file Core.h.

◆ JITDispatchHandlerFunction

An asynchronous wrapper-function callable from the executor via jit-dispatch.

Definition at line 1445 of file Core.h.

◆ SendResultFunction

Send a result to the remote.

Definition at line 1438 of file Core.h.

Constructor & Destructor Documentation

◆ ExecutionSession()

llvm::orc::ExecutionSession::ExecutionSession ( std::unique_ptr< ExecutorProcessControl EPC)

Construct an ExecutionSession with the given ExecutorProcessControl object.

Definition at line 1592 of file Core.cpp.

◆ ~ExecutionSession()

llvm::orc::ExecutionSession::~ExecutionSession ( )

Destroy an ExecutionSession.

Verifies that endSession was called prior to destruction.

Definition at line 1598 of file Core.cpp.

References assert().

Member Function Documentation

◆ callSPSWrapper()

template<typename SPSSignature , typename... WrapperCallArgTs>
Error llvm::orc::ExecutionSession::callSPSWrapper ( ExecutorAddr  WrapperFnAddr,
WrapperCallArgTs &&...  WrapperCallArgs 
)
inline

Run a wrapper function using SPS to serialize the arguments and deserialize the results.

If SPSSignature is a non-void function signature then the second argument (the first in the Args list) should be a reference to a return value.

Definition at line 1688 of file Core.h.

Referenced by llvm::orc::ORCPlatformSupport::deinitialize(), and llvm::orc::EPCDebugObjectRegistrar::registerDebugObject().

◆ callSPSWrapperAsync()

template<typename SPSSignature , typename SendResultT , typename... ArgTs>
void llvm::orc::ExecutionSession::callSPSWrapperAsync ( ExecutorAddr  WrapperFnAddr,
SendResultT &&  SendResult,
const ArgTs &...  Args 
)
inline

Run a wrapper function using SPS to serialize the arguments and deserialize the results.

Definition at line 1676 of file Core.h.

◆ callWrapper()

shared::WrapperFunctionResult llvm::orc::ExecutionSession::callWrapper ( ExecutorAddr  WrapperFnAddr,
ArrayRef< char ArgBuffer 
)
inline

Run a wrapper function in the executor.

The wrapper function should be callable as:

CWrapperFunctionResult fn(uint8_t *Data, uint64_t Size);
uint64_t Size

{.cpp}

Definition at line 1668 of file Core.h.

◆ callWrapperAsync()

template<typename... ArgTs>
void llvm::orc::ExecutionSession::callWrapperAsync ( ArgTs &&...  Args)
inline

Run a wrapper function in the executor.

The wrapper function should be callable as:

CWrapperFunctionResult fn(uint8_t *Data, uint64_t Size);

{.cpp}

The given OnComplete function will be called to return the result.

Definition at line 1658 of file Core.h.

◆ createBareJITDylib()

JITDylib & llvm::orc::ExecutionSession::createBareJITDylib ( std::string  Name)

Add a new bare JITDylib to this ExecutionSession.

The JITDylib Name is required to be unique. Clients should verify that names are not being re-used (E.g. by calling getJITDylibByName) if names are based on user input.

This call does not install any library code or symbols into the newly created JITDylib. The client is responsible for all configuration.

Definition at line 1647 of file Core.cpp.

References assert(), getJITDylibByName(), JITDylib, Name, and runSessionLocked().

Referenced by llvm::orc::COFFPlatform::Create(), createJITDylib(), llvm::orc::ExecutorNativePlatform::operator()(), and llvm::orc::LLJITBuilderState::prepareForConstruction().

◆ createJITDylib()

Expected< JITDylib & > llvm::orc::ExecutionSession::createJITDylib ( std::string  Name)

Add a new JITDylib to this ExecutionSession.

The JITDylib Name is required to be unique. Clients should verify that names are not being re-used (e.g. by calling getJITDylibByName) if names are based on user input.

If a Platform is attached then Platform::setupJITDylib will be called to install standard platform symbols (e.g. standard library interposes). If no Platform is attached this call is equivalent to createBareJITDylib.

Definition at line 1656 of file Core.cpp.

References createBareJITDylib(), and Name.

◆ deregisterResourceManager()

void llvm::orc::ExecutionSession::deregisterResourceManager ( ResourceManager RM)

Deregister the given ResourceManager with this ExecutionSession.

Manager must have been previously registered.

Definition at line 1625 of file Core.cpp.

References assert(), llvm::find(), I, and runSessionLocked().

◆ dispatchTask()

void llvm::orc::ExecutionSession::dispatchTask ( std::unique_ptr< Task T)
inline

Materialize the given unit.

Definition at line 1642 of file Core.h.

References assert(), and DEBUG_WITH_TYPE.

◆ dump()

void llvm::orc::ExecutionSession::dump ( raw_ostream OS)

Dump the state of all the JITDylibs in this session.

Definition at line 1947 of file Core.cpp.

References OS, and runSessionLocked().

◆ endSession()

Error llvm::orc::ExecutionSession::endSession ( )

End the session.

Closes all JITDylibs and disconnects from the executor. Clients must call this method before destroying the session.

Definition at line 1604 of file Core.cpp.

References llvm::dbgs(), llvm::joinErrors(), LLVM_DEBUG, removeJITDylibs(), and runSessionLocked().

◆ getExecutorProcessControl()

ExecutorProcessControl & llvm::orc::ExecutionSession::getExecutorProcessControl ( )
inline

◆ getJITDylibByName()

JITDylib * llvm::orc::ExecutionSession::getJITDylibByName ( StringRef  Name)

Return a pointer to the "name" JITDylib.

Ownership of JITDylib remains within Execution Session

Definition at line 1638 of file Core.cpp.

References Name, and runSessionLocked().

Referenced by createBareJITDylib().

◆ getPageSize()

size_t llvm::orc::ExecutionSession::getPageSize ( ) const
inline

Definition at line 1474 of file Core.h.

◆ getPlatform()

Platform * llvm::orc::ExecutionSession::getPlatform ( )
inline

Get the Platform for this session.

Will return null if no Platform has been set for this ExecutionSession.

Definition at line 1489 of file Core.h.

References P.

Referenced by llvm::orc::JITDylib::define().

◆ getSymbolStringPool()

std::shared_ptr< SymbolStringPool > llvm::orc::ExecutionSession::getSymbolStringPool ( )
inline

Get the SymbolStringPool for this instance.

Definition at line 1477 of file Core.h.

Referenced by llvm::orc::JITDylib::remove().

◆ getTargetTriple()

const Triple & llvm::orc::ExecutionSession::getTargetTriple ( ) const
inline

◆ intern()

SymbolStringPtr llvm::orc::ExecutionSession::intern ( StringRef  SymName)
inline

◆ lookup() [1/5]

Expected< ExecutorSymbolDef > llvm::orc::ExecutionSession::lookup ( ArrayRef< JITDylib * >  SearchOrder,
StringRef  Symbol,
SymbolState  RequiredState = SymbolState::Ready 
)

Convenience version of blocking lookup.

Searches each of the JITDylibs in the search order in turn for the given symbol. The search will not find non-exported symbols.

Definition at line 1890 of file Core.cpp.

References intern(), lookup(), and Name.

◆ lookup() [2/5]

Expected< ExecutorSymbolDef > llvm::orc::ExecutionSession::lookup ( ArrayRef< JITDylib * >  SearchOrder,
SymbolStringPtr  Symbol,
SymbolState  RequiredState = SymbolState::Ready 
)

Convenience version of blocking lookup.

Searches each of the JITDylibs in the search order in turn for the given symbol. The search will not find non-exported symbols.

Definition at line 1884 of file Core.cpp.

References lookup(), llvm::orc::makeJITDylibSearchOrder(), and Name.

◆ lookup() [3/5]

Expected< SymbolMap > llvm::orc::ExecutionSession::lookup ( const JITDylibSearchOrder SearchOrder,
SymbolLookupSet  Symbols,
LookupKind  K = LookupKind::Static,
SymbolState  RequiredState = SymbolState::Ready,
RegisterDependenciesFunction  RegisterDependencies = NoDependenciesToRegister 
)

Blocking version of lookup above.

Returns the resolved symbol map. If WaitUntilReady is true (the default), will not return until all requested symbols are ready (or an error occurs). If WaitUntilReady is false, will return as soon as all requested symbols are resolved, or an error occurs. If WaitUntilReady is false and an error occurs after resolution, the function will return a success value, but the error will be reported via reportErrors.

Definition at line 1816 of file Core.cpp.

References _, lookup(), llvm::orc::Result, and llvm::Error::success().

◆ lookup() [4/5]

Expected< ExecutorSymbolDef > llvm::orc::ExecutionSession::lookup ( const JITDylibSearchOrder SearchOrder,
SymbolStringPtr  Symbol,
SymbolState  RequiredState = SymbolState::Ready 
)

Convenience version of blocking lookup.

Searches each of the JITDylibs in the search order in turn for the given symbol.

Definition at line 1870 of file Core.cpp.

References assert(), lookup(), Name, llvm::orc::NoDependenciesToRegister, and llvm::orc::Static.

◆ lookup() [5/5]

void llvm::orc::ExecutionSession::lookup ( LookupKind  K,
const JITDylibSearchOrder SearchOrder,
SymbolLookupSet  Symbols,
SymbolState  RequiredState,
SymbolsResolvedCallback  NotifyComplete,
RegisterDependenciesFunction  RegisterDependencies 
)

Search the given JITDylibs for the given symbols.

SearchOrder lists the JITDylibs to search. For each dylib, the associated boolean indicates whether the search should match against non-exported (hidden visibility) symbols in that dylib (true means match against non-exported symbols, false means do not match).

The NotifyComplete callback will be called once all requested symbols reach the required state.

If all symbols are found, the RegisterDependencies function will be called while the session lock is held. This gives clients a chance to register dependencies for on the queried symbols for any symbols they are materializing (if a MaterializationResponsibility instance is present, this can be implemented by calling MaterializationResponsibility::addDependencies). If there are no dependenant symbols for this query (e.g. it is being made by a top level client to get an address to call) then the value NoDependenciesToRegister can be used.

Definition at line 1786 of file Core.cpp.

References llvm::dbgs(), LLVM_DEBUG, runSessionLocked(), and llvm::Error::success().

Referenced by llvm::orc::GDBJITDebugInfoRegistrationPlugin::Create(), llvm::orc::JITCompileCallbackManager::executeCompileCallback(), lookup(), llvm::orc::lookupAndRecordAddrs(), llvm::orc::Platform::lookupInitSymbols(), llvm::orc::Platform::lookupInitSymbolsAsync(), registerJITDispatchHandlers(), llvm::orc::Speculator::registerSymbols(), llvm::orc::LazyCallThroughManager::resolveTrampolineLandingAddress(), llvm::orc::COFFPlatform::setupJITDylib(), and llvm::orc::DLLImportDefinitionGenerator::tryToGenerate().

◆ lookupFlags() [1/2]

Expected< SymbolFlagsMap > llvm::orc::ExecutionSession::lookupFlags ( LookupKind  K,
JITDylibSearchOrder  SearchOrder,
SymbolLookupSet  Symbols 
)

Blocking version of lookupFlags.

Definition at line 1771 of file Core.cpp.

References llvm::orc::Result, and llvm::Error::success().

◆ lookupFlags() [2/2]

void llvm::orc::ExecutionSession::lookupFlags ( LookupKind  K,
JITDylibSearchOrder  SearchOrder,
SymbolLookupSet  Symbols,
unique_function< void(Expected< SymbolFlagsMap >)>  OnComplete 
)

Search the given JITDylibs to find the flags associated with each of the given symbols.

Definition at line 1760 of file Core.cpp.

References llvm::Error::success().

Referenced by llvm::orc::buildSimpleReexportsAliasMap(), and llvm::orc::ReexportsGenerator::tryToGenerate().

◆ registerJITDispatchHandlers()

Error llvm::orc::ExecutionSession::registerJITDispatchHandlers ( JITDylib JD,
JITDispatchHandlerAssociationMap  WFs 
)

For each tag symbol name, associate the corresponding AsyncHandlerWrapperFunction with the address of that symbol.

The handler becomes callable from the executor using the ORC runtime __orc_rt_jit_dispatch function and the given tag.

Tag symbols will be looked up in JD using LookupKind::Static, JITDylibLookupFlags::MatchAllSymbols (hidden tags will be found), and LookupFlags::WeaklyReferencedSymbol. Missing tag definitions will not cause an error, the handler will simply be dropped.

Definition at line 1895 of file Core.cpp.

References assert(), llvm::dbgs(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::formatv(), llvm::orc::SymbolLookupSet::fromMapKeys(), I, llvm::inconvertibleErrorCode(), LLVM_DEBUG, lookup(), llvm::orc::MatchAllSymbols, llvm::Error::success(), and llvm::orc::WeaklyReferencedSymbol.

◆ registerResourceManager()

void llvm::orc::ExecutionSession::registerResourceManager ( ResourceManager RM)

Register the given ResourceManager with this ExecutionSession.

Managers will be notified of events in reverse order of registration.

Definition at line 1621 of file Core.cpp.

References runSessionLocked().

Referenced by llvm::orc::ObjectLinkingLayer::ObjectLinkingLayer(), and llvm::orc::RTDyldObjectLinkingLayer::RTDyldObjectLinkingLayer().

◆ removeJITDylib()

Error llvm::orc::ExecutionSession::removeJITDylib ( JITDylib JD)
inline

Calls removeJTIDylibs on the gives JITDylib.

Definition at line 1550 of file Core.h.

References removeJITDylibs().

◆ removeJITDylibs()

Error llvm::orc::ExecutionSession::removeJITDylibs ( std::vector< JITDylibSP JDsToRemove)

Removes the given JITDylibs from the ExecutionSession.

This method clears all resources held for the JITDylibs, puts them in the closed state, and clears all references to them that are held by the ExecutionSession or other JITDylibs. No further code can be added to the removed JITDylibs, and the JITDylib objects will be freed once any remaining JITDylibSPs pointing to them are destroyed.

This method does not run static destructors for code contained in the JITDylibs, and each JITDylib can only be removed once.

JITDylibs will be removed in the order given. Teardown is usually independent for each JITDylib, but not always. In particular, where the ORC runtime is used it is expected that teardown off all JITDylibs will depend on it, so the JITDylib containing the ORC runtime must be removed last. If the client has introduced any other dependencies they should be accounted for in the removal order too.

Definition at line 1664 of file Core.cpp.

References assert(), llvm::find(), I, llvm::joinErrors(), runSessionLocked(), and llvm::Error::success().

Referenced by endSession(), and removeJITDylib().

◆ reportError()

void llvm::orc::ExecutionSession::reportError ( Error  Err)
inline

◆ runJITDispatchHandler()

void llvm::orc::ExecutionSession::runJITDispatchHandler ( SendResultFunction  SendResult,
ExecutorAddr  HandlerFnTagAddr,
ArrayRef< char ArgBuffer 
)

Run a registered jit-side wrapper function.

This should be called by the ExecutorProcessControl instance in response to incoming jit-dispatch requests from the executor.

Definition at line 1926 of file Core.cpp.

References llvm::orc::shared::WrapperFunctionResult::createOutOfBandError(), llvm::ArrayRef< T >::data(), F, llvm::formatv(), I, and llvm::ArrayRef< T >::size().

◆ runSessionLocked()

template<typename Func >
decltype(auto) llvm::orc::ExecutionSession::runSessionLocked ( Func &&  F)
inline

◆ setDispatchTask()

ExecutionSession & llvm::orc::ExecutionSession::setDispatchTask ( DispatchTaskFunction  DispatchTask)
inline

Set the task dispatch function.

Definition at line 1566 of file Core.h.

◆ setErrorReporter()

ExecutionSession & llvm::orc::ExecutionSession::setErrorReporter ( ErrorReporter  ReportError)
inline

Set the error reporter function.

Definition at line 1555 of file Core.h.

◆ setPlatform()

void llvm::orc::ExecutionSession::setPlatform ( std::unique_ptr< Platform P)
inline

Set the Platform for this ExecutionSession.

Definition at line 1485 of file Core.h.

References P.

Referenced by llvm::orc::ExecutorNativePlatform::operator()().

◆ wrapAsyncWithSPS() [1/2]

template<typename SPSSignature , typename ClassT , typename... MethodArgTs>
static JITDispatchHandlerFunction llvm::orc::ExecutionSession::wrapAsyncWithSPS ( ClassT *  Instance,
void(ClassT::*)(MethodArgTs...)  Method 
)
inlinestatic

Wrap a class method that takes concrete argument types (and a sender for a concrete return type) to produce an AsyncHandlerWrapperFunction.

Uses SPS to unpack the arguments and pack the result.

This function is intended to support easy construction of AsyncHandlerWrapperFunctions that can be associated with a tag (using registerJITDispatchHandler) and called from the executor.

Definition at line 1720 of file Core.h.

◆ wrapAsyncWithSPS() [2/2]

template<typename SPSSignature , typename HandlerT >
static JITDispatchHandlerFunction llvm::orc::ExecutionSession::wrapAsyncWithSPS ( HandlerT &&  H)
inlinestatic

Wrap a handler that takes concrete argument types (and a sender for a concrete return type) to produce an AsyncHandlerWrapperFunction.

Uses SPS to unpack the arguments and pack the result.

This function is intended to support easy construction of AsyncHandlerWrapperFunctions that can be associated with a tag (using registerJITDispatchHandler) and called from the executor.

Definition at line 1702 of file Core.h.

References H.

Friends And Related Function Documentation

◆ InProgressFullLookupState

friend class InProgressFullLookupState
friend

Definition at line 1427 of file Core.h.

◆ InProgressLookupFlagsState

friend class InProgressLookupFlagsState
friend

Definition at line 1426 of file Core.h.

◆ JITDylib

friend class JITDylib
friend

Definition at line 1428 of file Core.h.

Referenced by createBareJITDylib().

◆ LookupState

friend class LookupState
friend

Definition at line 1429 of file Core.h.

◆ MaterializationResponsibility

friend class MaterializationResponsibility
friend

Definition at line 1430 of file Core.h.

◆ ResourceTracker

friend class ResourceTracker
friend

Definition at line 1431 of file Core.h.


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