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

IR mutating layer. More...

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

Public Member Functions

 IRTransformLayer (BaseLayerT &BaseLayer, TransformFtor Transform=TransformFtor())
 Construct an IRTransformLayer with the given BaseLayer. More...
 
Error addModule (VModuleKey K, std::unique_ptr< Module > M)
 Apply the transform functor to the module, then add the module to the layer below, along with the memory manager and symbol resolver. More...
 
Error removeModule (VModuleKey K)
 Remove the module associated with the VModuleKey K. 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 module represented by the VModuleKey K. More...
 
Error emitAndFinalize (VModuleKey K)
 Immediately emit and finalize the module represented by the given VModuleKey. More...
 
TransformFtor & getTransform ()
 Access the transform functor directly. More...
 
const TransformFtor & getTransform () const
 Access the mumate functor directly. More...
 

Detailed Description

template<typename BaseLayerT, typename TransformFtor>
class llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >

IR mutating layer.

This layer applies a user supplied transform to each module that is added, then adds the transformed module to the layer below.

Definition at line 49 of file IRTransformLayer.h.

Constructor & Destructor Documentation

◆ IRTransformLayer()

template<typename BaseLayerT , typename TransformFtor >
llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::IRTransformLayer ( BaseLayerT &  BaseLayer,
TransformFtor  Transform = TransformFtor() 
)
inline

Construct an IRTransformLayer with the given BaseLayer.

Definition at line 53 of file IRTransformLayer.h.

Member Function Documentation

◆ addModule()

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

Apply the transform functor to the module, then add the module to the layer below, along with the memory manager and symbol resolver.

Returns
A handle for the added modules.

Definition at line 61 of file IRTransformLayer.h.

◆ emitAndFinalize()

template<typename BaseLayerT , typename TransformFtor >
Error llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::emitAndFinalize ( VModuleKey  K)
inline

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

Parameters
KThe VModuleKey for the module to emit/finalize.

Definition at line 92 of file IRTransformLayer.h.

◆ findSymbol()

template<typename BaseLayerT , typename TransformFtor >
JITSymbol llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::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 72 of file IRTransformLayer.h.

◆ findSymbolIn()

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

Get the address of the given symbol in the context of the module represented by the VModuleKey K.

This call is forwarded to the base layer's implementation.

Parameters
KThe VModuleKey for the module to search in.
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 is found in the given module.

Definition at line 84 of file IRTransformLayer.h.

◆ getTransform() [1/2]

template<typename BaseLayerT , typename TransformFtor >
TransformFtor& llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::getTransform ( )
inline

Access the transform functor directly.

Definition at line 95 of file IRTransformLayer.h.

◆ getTransform() [2/2]

template<typename BaseLayerT , typename TransformFtor >
const TransformFtor& llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::getTransform ( ) const
inline

Access the mumate functor directly.

Definition at line 98 of file IRTransformLayer.h.

◆ removeModule()

template<typename BaseLayerT , typename TransformFtor >
Error llvm::orc::IRTransformLayer< BaseLayerT, TransformFtor >::removeModule ( VModuleKey  K)
inline

Remove the module associated with the VModuleKey K.

Definition at line 66 of file IRTransformLayer.h.


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