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

Lazy-emitting IR layer. More...

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

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

Public Member Functions

 LazyEmittingLayer (BaseLayerT &BaseLayer)
 Construct a lazy emitting layer. More...
 
Error addModule (VModuleKey K, std::unique_ptr< Module > M)
 Add the given module to the lazy emitting layer. More...
 
Error removeModule (VModuleKey K)
 Remove the module represented by the given handle. More...
 
JITSymbol findSymbol (const std::string &Name, bool ExportedSymbolsOnly)
 Search for the given named symbol. More...
 
JITSymbol findSymbolIn (VModuleKey K, const std::string &Name, bool ExportedSymbolsOnly)
 Get the address of the given symbol in the context of the of compiled modules represented by the key K. More...
 
Error emitAndFinalize (VModuleKey K)
 Immediately emit and finalize the module represented by the given key. More...
 

Detailed Description

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

Lazy-emitting IR layer.

This layer accepts LLVM IR Modules (via addModule), 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 42 of file LazyEmittingLayer.h.

Constructor & Destructor Documentation

◆ LazyEmittingLayer()

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

Construct a lazy emitting layer.

Definition at line 200 of file LazyEmittingLayer.h.

Member Function Documentation

◆ addModule()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::addModule ( VModuleKey  K,
std::unique_ptr< Module M 
)
inline

Add the given module to the lazy emitting layer.

Definition at line 203 of file LazyEmittingLayer.h.

◆ emitAndFinalize()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::emitAndFinalize ( VModuleKey  K)
inline

Immediately emit and finalize the module represented by the given key.

Definition at line 252 of file LazyEmittingLayer.h.

◆ findSymbol()

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 226 of file LazyEmittingLayer.h.

◆ findSymbolIn()

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

Get the address of the given symbol in the context of the of compiled modules represented by the key K.

Definition at line 244 of file LazyEmittingLayer.h.

◆ removeModule()

template<typename BaseLayerT>
Error llvm::orc::LazyEmittingLayer< BaseLayerT >::removeModule ( VModuleKey  K)
inline

Remove the module represented by the given handle.

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

Definition at line 214 of file LazyEmittingLayer.h.


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