|
LLVM
10.0.0
|
Bare bones object linking layer. More...
#include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h"
Classes | |
| struct | Resources |
Public Types | |
| using | NotifyLoadedFtor = std::function< void(VModuleKey, const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &)> |
| Functor for receiving object-loaded notifications. More... | |
| using | NotifyFinalizedFtor = std::function< void(VModuleKey, const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &)> |
| Functor for receiving finalization notifications. More... | |
| using | NotifyFreedFtor = std::function< void(VModuleKey, const object::ObjectFile &Obj)> |
| Functor for receiving deallocation notifications. More... | |
| using | ResourcesGetter = std::function< Resources(VModuleKey)> |
| using | ObjectPtr = std::unique_ptr< MemoryBuffer > |
Public Types inherited from llvm::orc::LegacyRTDyldObjectLinkingLayerBase | |
| using | ObjectPtr = std::unique_ptr< MemoryBuffer > |
Public Member Functions | |
| LLVM_ATTRIBUTE_DEPRECATED (LegacyRTDyldObjectLinkingLayer(ExecutionSession &ES, ResourcesGetter GetResources, NotifyLoadedFtor NotifyLoaded=NotifyLoadedFtor(), NotifyFinalizedFtor NotifyFinalized=NotifyFinalizedFtor(), NotifyFreedFtor NotifyFreed=NotifyFreedFtor()), "ORCv1 layers (layers with the 'Legacy' prefix) are deprecated. Please " "use " "ORCv2 (see docs/ORCv2.rst)") | |
| Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyFinalized functors. More... | |
| LegacyRTDyldObjectLinkingLayer (ORCv1DeprecationAcknowledgement, ExecutionSession &ES, ResourcesGetter GetResources, NotifyLoadedFtor NotifyLoaded=NotifyLoadedFtor(), NotifyFinalizedFtor NotifyFinalized=NotifyFinalizedFtor(), NotifyFreedFtor NotifyFreed=NotifyFreedFtor()) | |
| void | setProcessAllSections (bool ProcessAllSections) |
| Set the 'ProcessAllSections' flag. More... | |
| Error | addObject (VModuleKey K, ObjectPtr ObjBuffer) |
| Add an object to the JIT. More... | |
| Error | removeObject (VModuleKey K) |
| Remove the object associated with VModuleKey K. More... | |
| JITSymbol | findSymbol (StringRef Name, bool ExportedSymbolsOnly) |
| Search for the given named symbol. More... | |
| JITSymbol | findSymbolIn (VModuleKey K, StringRef Name, bool ExportedSymbolsOnly) |
| Search for the given named symbol in the context of the loaded object represented by the VModuleKey K. More... | |
| void | mapSectionAddress (VModuleKey K, const void *LocalAddress, JITTargetAddress TargetAddr) |
| Map section addresses for the object associated with the VModuleKey K. More... | |
| Error | emitAndFinalize (VModuleKey K) |
| Immediately emit and finalize the object represented by the given VModuleKey. More... | |
Bare bones object linking layer.
This class is intended to be used as the base layer for a JIT. It allows object files to be loaded into memory, linked, and the addresses of their symbols queried. All objects added to this layer can see each other's symbols.
Definition at line 190 of file RTDyldObjectLinkingLayer.h.
| using llvm::orc::LegacyRTDyldObjectLinkingLayer::NotifyFinalizedFtor = std::function<void(VModuleKey, const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &)> |
Functor for receiving finalization notifications.
Definition at line 203 of file RTDyldObjectLinkingLayer.h.
| using llvm::orc::LegacyRTDyldObjectLinkingLayer::NotifyFreedFtor = std::function<void(VModuleKey, const object::ObjectFile &Obj)> |
Functor for receiving deallocation notifications.
Definition at line 206 of file RTDyldObjectLinkingLayer.h.
| using llvm::orc::LegacyRTDyldObjectLinkingLayer::NotifyLoadedFtor = std::function<void(VModuleKey, const object::ObjectFile &Obj, const RuntimeDyld::LoadedObjectInfo &)> |
Functor for receiving object-loaded notifications.
Definition at line 198 of file RTDyldObjectLinkingLayer.h.
| using llvm::orc::LegacyRTDyldObjectLinkingLayerBase::ObjectPtr = std::unique_ptr<MemoryBuffer> |
Definition at line 140 of file RTDyldObjectLinkingLayer.h.
| using llvm::orc::LegacyRTDyldObjectLinkingLayer::ResourcesGetter = std::function<Resources(VModuleKey)> |
Definition at line 354 of file RTDyldObjectLinkingLayer.h.
|
inline |
Definition at line 369 of file RTDyldObjectLinkingLayer.h.
|
inline |
Add an object to the JIT.
Definition at line 391 of file RTDyldObjectLinkingLayer.h.
References assert(), llvm::object::ObjectFile::createObjectFile(), and llvm::Error::success().
|
inline |
Immediately emit and finalize the object represented by the given VModuleKey.
| K | VModuleKey for object to emit/finalize. |
Definition at line 462 of file RTDyldObjectLinkingLayer.h.
References assert().
|
inline |
Search for the given named symbol.
| Name | The name of the symbol to search for. |
| ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 428 of file RTDyldObjectLinkingLayer.h.
|
inline |
Search for the given named symbol in the context of the loaded object represented by the VModuleKey K.
| K | The VModuleKey for the object to search in. |
| Name | The name of the symbol to search for. |
| ExportedSymbolsOnly | If true, search only for exported symbols. |
Definition at line 445 of file RTDyldObjectLinkingLayer.h.
References assert().
| llvm::orc::LegacyRTDyldObjectLinkingLayer::LLVM_ATTRIBUTE_DEPRECATED | ( | LegacyRTDyldObjectLinkingLayer(ExecutionSession &ES, ResourcesGetter GetResources, NotifyLoadedFtor NotifyLoaded=NotifyLoadedFtor(), NotifyFinalizedFtor NotifyFinalized=NotifyFinalizedFtor(), NotifyFreedFtor NotifyFreed=NotifyFreedFtor()) | , |
| "ORCv1 layers (layers with the 'Legacy' prefix) are deprecated. Please " "use " "ORCv2 (see docs/ORCv2.rst)" | |||
| ) |
Construct an ObjectLinkingLayer with the given NotifyLoaded, and NotifyFinalized functors.
|
inline |
Map section addresses for the object associated with the VModuleKey K.
Definition at line 453 of file RTDyldObjectLinkingLayer.h.
References assert().
|
inline |
Remove the object associated with VModuleKey K.
All memory allocated for the object will be freed, and the sections and symbols it provided will no longer be available. No attempt is made to re-emit the missing symbols, and any use of these symbols (directly or indirectly) will result in undefined behavior. If dependence tracking is required to detect or resolve such issues it should be added at a higher layer.
Definition at line 417 of file RTDyldObjectLinkingLayer.h.
References assert(), and llvm::Error::success().
|
inline |
Set the 'ProcessAllSections' flag.
If set to true, all sections in each object file will be allocated using the memory manager, rather than just the sections required for execution.
This is kludgy, and may be removed in the future.
Definition at line 386 of file RTDyldObjectLinkingLayer.h.
1.8.13