LLVM  8.0.0svn
Public Types | Public Member Functions | List of all members
llvm::orc::ExecutionSession Class Reference

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

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

Inheritance diagram for llvm::orc::ExecutionSession:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::ExecutionSession:
Collaboration graph
[legend]

Public Types

using ErrorReporter = std::function< void(Error)>
 
using DispatchMaterializationFunction = std::function< void(JITDylib &JD, std::unique_ptr< MaterializationUnit > MU)>
 
- Public Types inherited from llvm::orc::ExecutionSessionBase
using ErrorReporter = std::function< void(Error)>
 For reporting errors. More...
 
using DispatchMaterializationFunction = std::function< void(JITDylib &JD, std::unique_ptr< MaterializationUnit > MU)>
 For dispatching MaterializationUnit::materialize calls. More...
 
using LegacyAsyncLookupFunction = std::function< SymbolNameSet(std::shared_ptr< AsynchronousSymbolQuery > Q, SymbolNameSet Names)>
 

Public Member Functions

 ExecutionSession (std::shared_ptr< SymbolStringPool > SSP=nullptr)
 Construct an ExecutionEngine. More...
 
JITDylibcreateJITDylib (std::string Name)
 Add a new JITDylib to this ExecutionSession. More...
 
- Public Member Functions inherited from llvm::orc::ExecutionSessionBase
 ExecutionSessionBase (std::shared_ptr< SymbolStringPool > SSP=nullptr)
 Construct an ExecutionSessionBase. More...
 
SymbolStringPoolgetSymbolStringPool () const
 Returns the SymbolStringPool for this ExecutionSession. More...
 
template<typename Func >
auto runSessionLocked (Func &&F) -> decltype(F())
 Run the given lambda with the session mutex locked. More...
 
ExecutionSessionBasesetErrorReporter (ErrorReporter ReportError)
 Set the error reporter function. More...
 
ExecutionSessionBasesetDispatchMaterialization (DispatchMaterializationFunction DispatchMaterialization)
 Set the materialization dispatch function. More...
 
void reportError (Error Err)
 Report a error for this execution session. More...
 
VModuleKey allocateVModule ()
 Allocate a module key for a new module to add to the JIT. More...
 
void releaseVModule (VModuleKey Key)
 Return a module key to the ExecutionSession so that it can be re-used. More...
 
void legacyFailQuery (AsynchronousSymbolQuery &Q, Error Err)
 
Expected< SymbolMaplegacyLookup (ExecutionSessionBase &ES, LegacyAsyncLookupFunction AsyncLookup, SymbolNameSet Names, bool WaiUntilReady, RegisterDependenciesFunction RegisterDependencies)
 A legacy lookup function for JITSymbolResolverAdapter. More...
 
void lookup (const JITDylibList &JDs, const SymbolNameSet &Symbols, SymbolsResolvedCallback OnResolve, SymbolsReadyCallback OnReady, RegisterDependenciesFunction RegisterDependencies)
 Search the given JITDylib list for the given symbols. More...
 
Expected< SymbolMaplookup (const JITDylibList &JDs, const SymbolNameSet &Symbols, RegisterDependenciesFunction RegisterDependencies, bool WaitUntilReady=true)
 Blocking version of lookup above. More...
 
void dispatchMaterialization (JITDylib &JD, std::unique_ptr< MaterializationUnit > MU)
 Materialize the given unit. More...
 

Detailed Description

An ExecutionSession represents a running JIT program.

Definition at line 759 of file Core.h.

Member Typedef Documentation

◆ DispatchMaterializationFunction

Definition at line 764 of file Core.h.

◆ ErrorReporter

Definition at line 761 of file Core.h.

Constructor & Destructor Documentation

◆ ExecutionSession()

llvm::orc::ExecutionSession::ExecutionSession ( std::shared_ptr< SymbolStringPool SSP = nullptr)
inline

Construct an ExecutionEngine.

SymbolStringPools may be shared between ExecutionSessions.

Definition at line 769 of file Core.h.

References llvm::orc::lookup().

Member Function Documentation

◆ createJITDylib()

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

Add a new JITDylib to this ExecutionSession.

Definition at line 1678 of file Core.cpp.


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