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

Object mutating layer. More...

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

Public Member Functions

 LLVM_ATTRIBUTE_DEPRECATED (LegacyObjectTransformLayer(BaseLayerT &BaseLayer, TransformFtor Transform=TransformFtor()), "ORCv1 layers (layers with the 'Legacy' prefix) are deprecated. Please " "use " "the ORCv2 ObjectTransformLayer instead")
 Construct an ObjectTransformLayer with the given BaseLayer. More...
 
 LegacyObjectTransformLayer (ORCv1DeprecationAcknowledgement, BaseLayerT &BaseLayer, TransformFtor Transform=TransformFtor())
 Legacy layer constructor with deprecation acknowledgement. More...
 
template<typename ObjectPtr >
Error addObject (VModuleKey K, ObjectPtr Obj)
 Apply the transform functor to each object in the object set, then add the resulting set of objects to the base layer, along with the memory manager and symbol resolver. More...
 
Error removeObject (VModuleKey K)
 Remove the object set 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 set of objects represented by the VModuleKey K. More...
 
Error emitAndFinalize (VModuleKey K)
 Immediately emit and finalize the object set represented by the given VModuleKey K. More...
 
void mapSectionAddress (VModuleKey K, const void *LocalAddress, JITTargetAddress TargetAddr)
 Map section addresses for the objects associated with the VModuleKey K. 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::LegacyObjectTransformLayer< BaseLayerT, TransformFtor >

Object mutating layer.

This layer accepts sets of ObjectFiles (via addObject). It immediately applies the user supplied functor to each object, then adds the set of transformed objects to the layer below.

Definition at line 48 of file ObjectTransformLayer.h.

Constructor & Destructor Documentation

◆ LegacyObjectTransformLayer()

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

Legacy layer constructor with deprecation acknowledgement.

Definition at line 59 of file ObjectTransformLayer.h.

Referenced by llvm::orc::LegacyObjectTransformLayer< BaseLayerT, TransformFtor >::getTransform().

Member Function Documentation

◆ addObject()

template<typename BaseLayerT , typename TransformFtor >
template<typename ObjectPtr >
Error llvm::orc::LegacyObjectTransformLayer< BaseLayerT, TransformFtor >::addObject ( VModuleKey  K,
ObjectPtr  Obj 
)
inline

Apply the transform functor to each object in the object set, then add the resulting set of objects to the base layer, along with the memory manager and symbol resolver.

Returns
A handle for the added objects.

Definition at line 69 of file ObjectTransformLayer.h.

◆ emitAndFinalize()

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

Immediately emit and finalize the object set represented by the given VModuleKey K.

Definition at line 99 of file ObjectTransformLayer.h.

◆ findSymbol()

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

◆ findSymbolIn()

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

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

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

Parameters
KThe VModuleKey associated with the object set 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 object set.

Definition at line 92 of file ObjectTransformLayer.h.

◆ getTransform() [1/2]

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

Access the transform functor directly.

Definition at line 109 of file ObjectTransformLayer.h.

◆ getTransform() [2/2]

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

◆ LLVM_ATTRIBUTE_DEPRECATED()

template<typename BaseLayerT , typename TransformFtor >
llvm::orc::LegacyObjectTransformLayer< BaseLayerT, TransformFtor >::LLVM_ATTRIBUTE_DEPRECATED ( LegacyObjectTransformLayer< BaseLayerT, TransformFtor >(BaseLayerT &BaseLayer, TransformFtor Transform=TransformFtor())  ,
"ORCv1 layers (layers with the 'Legacy' prefix) are deprecated. Please " "use " "the ORCv2 ObjectTransformLayer instead"   
)

Construct an ObjectTransformLayer with the given BaseLayer.

◆ mapSectionAddress()

template<typename BaseLayerT , typename TransformFtor >
void llvm::orc::LegacyObjectTransformLayer< BaseLayerT, TransformFtor >::mapSectionAddress ( VModuleKey  K,
const void *  LocalAddress,
JITTargetAddress  TargetAddr 
)
inline

Map section addresses for the objects associated with the VModuleKey K.

Definition at line 103 of file ObjectTransformLayer.h.

◆ removeObject()

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

Remove the object set associated with the VModuleKey K.

Definition at line 74 of file ObjectTransformLayer.h.


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