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

IR mutating layer. More...

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

Public Member Functions

 LegacyIRTransformLayer (BaseLayerT &BaseLayer, TransformFtor Transform=TransformFtor())
 Construct an LegacyIRTransformLayer 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::LegacyIRTransformLayer< 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 56 of file IRTransformLayer.h.

Constructor & Destructor Documentation

◆ LegacyIRTransformLayer()

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

Construct an LegacyIRTransformLayer with the given BaseLayer.

Definition at line 60 of file IRTransformLayer.h.

Member Function Documentation

◆ addModule()

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

◆ emitAndFinalize()

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

◆ findSymbol()

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

◆ findSymbolIn()

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

◆ getTransform() [1/2]

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

Access the transform functor directly.

Definition at line 102 of file IRTransformLayer.h.

◆ getTransform() [2/2]

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

Access the mumate functor directly.

Definition at line 105 of file IRTransformLayer.h.

◆ removeModule()

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

Remove the module associated with the VModuleKey K.

Definition at line 73 of file IRTransformLayer.h.


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