LLVM  3.7.0
Classes | Public Types | Public Member Functions | List of all members
llvm::orc::LazyEmittingLayer< BaseLayerT > Class Template Reference

Lazy-emitting IR layer. More...

#include <LazyEmittingLayer.h>

Inheritance diagram for llvm::orc::LazyEmittingLayer< BaseLayerT >:
[legend]

Public Types

typedef
BaseLayerT::ModuleSetHandleT 
BaseLayerHandleT
 
typedef ModuleSetListT::iterator ModuleSetHandleT
 Handle to a set of loaded modules. More...
 

Public Member Functions

 LazyEmittingLayer (BaseLayerT &BaseLayer)
 Construct a lazy emitting layer. More...
 
template<typename ModuleSetT , typename MemoryManagerPtrT , typename SymbolResolverPtrT >
ModuleSetHandleT addModuleSet (ModuleSetT Ms, MemoryManagerPtrT MemMgr, SymbolResolverPtrT Resolver)
 Add the given set of modules to the lazy emitting layer. More...
 
void removeModuleSet (ModuleSetHandleT H)
 Remove the module set represented by the given handle. More...
 
JITSymbol findSymbol (const std::string &Name, bool ExportedSymbolsOnly)
 Search for the given named symbol. More...
 
JITSymbol findSymbolIn (ModuleSetHandleT H, const std::string &Name, bool ExportedSymbolsOnly)
 Get the address of the given symbol in the context of the set of compiled modules represented by the handle H. More...
 
void emitAndFinalize (ModuleSetHandleT H)
 Immediately emit and finalize the moduleOB set represented by the given handle. More...
 

Detailed Description

template<typename BaseLayerT>
class llvm::orc::LazyEmittingLayer< BaseLayerT >

Lazy-emitting IR layer.

This layer accepts sets of LLVM IR Modules (via addModuleSet), but does not immediately emit them the layer below. Instead, emissing to the base layer is deferred until the first time the client requests the address (via JITSymbol::getAddress) for a symbol contained in this layer.

Definition at line 35 of file LazyEmittingLayer.h.

Member Typedef Documentation

template<typename BaseLayerT>
typedef BaseLayerT::ModuleSetHandleT llvm::orc::LazyEmittingLayer< BaseLayerT >::BaseLayerHandleT

Definition at line 37 of file LazyEmittingLayer.h.

template<typename BaseLayerT>
typedef ModuleSetListT::iterator llvm::orc::LazyEmittingLayer< BaseLayerT >::ModuleSetHandleT

Handle to a set of loaded modules.

Definition at line 226 of file LazyEmittingLayer.h.

Constructor & Destructor Documentation

template<typename BaseLayerT>
llvm::orc::LazyEmittingLayer< BaseLayerT >::LazyEmittingLayer ( BaseLayerT &  BaseLayer)
inline

Construct a lazy emitting layer.

Definition at line 229 of file LazyEmittingLayer.h.

Member Function Documentation

template<typename BaseLayerT>
template<typename ModuleSetT , typename MemoryManagerPtrT , typename SymbolResolverPtrT >
ModuleSetHandleT llvm::orc::LazyEmittingLayer< BaseLayerT >::addModuleSet ( ModuleSetT  Ms,
MemoryManagerPtrT  MemMgr,
SymbolResolverPtrT  Resolver 
)
inline

Add the given set of modules to the lazy emitting layer.

Definition at line 234 of file LazyEmittingLayer.h.

Referenced by llvm::orc::OrcMCJITReplacement::addModule().

template<typename BaseLayerT>
void llvm::orc::LazyEmittingLayer< BaseLayerT >::emitAndFinalize ( ModuleSetHandleT  H)
inline

Immediately emit and finalize the moduleOB set represented by the given handle.

Parameters
HHandle for module set to emit/finalize.

Definition at line 282 of file LazyEmittingLayer.h.

template<typename BaseLayerT>
JITSymbol llvm::orc::LazyEmittingLayer< BaseLayerT >::findSymbol ( const std::string &  Name,
bool  ExportedSymbolsOnly 
)
inline

Search for the given named symbol.

Parameters
NameThe name of the symbol to search for.
ExportedSymbolsOnlyIf true, search only for exported symbols.
Returns
A handle for the given named symbol, if it exists.

Definition at line 256 of file LazyEmittingLayer.h.

template<typename BaseLayerT>
JITSymbol llvm::orc::LazyEmittingLayer< BaseLayerT >::findSymbolIn ( ModuleSetHandleT  H,
const std::string &  Name,
bool  ExportedSymbolsOnly 
)
inline

Get the address of the given symbol in the context of the set of compiled modules represented by the handle H.

Definition at line 274 of file LazyEmittingLayer.h.

template<typename BaseLayerT>
void llvm::orc::LazyEmittingLayer< BaseLayerT >::removeModuleSet ( ModuleSetHandleT  H)
inline

Remove the module set represented by the given handle.

This method will free the memory associated with the given module set, both in this layer, and the base layer.

Definition at line 247 of file LazyEmittingLayer.h.


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