LLVM: llvm::orc::COFFPlatform Class Reference (original) (raw)
Mediates between COFF initialization and ExecutionSession state. More...
#include "[llvm/ExecutionEngine/Orc/COFFPlatform.h](COFFPlatform%5F8h%5Fsource.html)"
| Public Types | |
|---|---|
| using | LoadDynamicLibrary |
| A function that will be called with the name of dll file that must be loaded. |
| Public Member Functions | |
|---|---|
| ExecutionSession & | getExecutionSession () const |
| ObjectLinkingLayer & | getObjectLinkingLayer () const |
| Error | setupJITDylib (JITDylib &JD) override |
| This method will be called outside the session lock each time a JITDylib is created (unless it is created with EmptyJITDylib set) to allow the Platform to install any JITDylib specific standard symbols (e.g __dso_handle). | |
| Error | teardownJITDylib (JITDylib &JD) override |
| This method will be called outside the session lock each time a JITDylib is removed to allow the Platform to remove any JITDylib-specific data. | |
| Error | notifyAdding (ResourceTracker &RT, const MaterializationUnit &MU) override |
| This method will be called under the ExecutionSession lock each time a MaterializationUnit is added to a JITDylib. | |
| Error | notifyRemoving (ResourceTracker &RT) override |
| This method will be called under the ExecutionSession lock when a ResourceTracker is removed. | |
| Public Member Functions inherited from llvm::orc::Platform | |
| virtual | ~Platform () |
| Static Public Member Functions | |
|---|---|
| static Expected< std::unique_ptr< COFFPlatform > > | Create (ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, std::unique_ptr< MemoryBuffer > OrcRuntimeArchiveBuffer, LoadDynamicLibrary LoadDynLibrary, bool StaticVCRuntime=false, const char *VCRuntimePath=nullptr, std::optional< SymbolAliasMap > RuntimeAliases=std::nullopt) |
| Try to create a COFFPlatform instance, adding the ORC runtime to the given JITDylib. | |
| static Expected< std::unique_ptr< COFFPlatform > > | Create (ObjectLinkingLayer &ObjLinkingLayer, JITDylib &PlatformJD, const char *OrcRuntimePath, LoadDynamicLibrary LoadDynLibrary, bool StaticVCRuntime=false, const char *VCRuntimePath=nullptr, std::optional< SymbolAliasMap > RuntimeAliases=std::nullopt) |
| static SymbolAliasMap | standardPlatformAliases (ExecutionSession &ES) |
| Returns an AliasMap containing the default aliases for the COFFPlatform. | |
| static ArrayRef< std::pair< const char *, const char * > > | requiredCXXAliases () |
| Returns the array of required CXX aliases. | |
| static ArrayRef< std::pair< const char *, const char * > > | standardRuntimeUtilityAliases () |
| Returns the array of standard runtime utility aliases for COFF. | |
| static StringRef | getSEHFrameSectionName () |
| Static Public Member Functions inherited from llvm::orc::Platform | |
| static Expected< DenseMap< JITDylib *, SymbolMap > > | lookupInitSymbols (ExecutionSession &ES, const DenseMap< JITDylib *, SymbolLookupSet > &InitSyms) |
| A utility function for looking up initializer symbols. | |
| static void | lookupInitSymbolsAsync (unique_function< void(Error)> OnComplete, ExecutionSession &ES, const DenseMap< JITDylib *, SymbolLookupSet > &InitSyms) |
| Performs an async lookup for the given symbols in each of the given JITDylibs, calling the given handler once all lookups have completed. |
Mediates between COFF initialization and ExecutionSession state.
Definition at line 35 of file COFFPlatform.h.
◆ LoadDynamicLibrary
Initial value:
StringRef - Represent a constant reference to a string, i.e.
Represents a JIT'd dynamic library.
unique_function is a type-erasing functor similar to std::function.
A function that will be called with the name of dll file that must be loaded.
Definition at line 39 of file COFFPlatform.h.
◆ Create() [1/2]
◆ Create() [2/2]
Try to create a COFFPlatform instance, adding the ORC runtime to the given JITDylib.
Definition at line 154 of file COFFPlatform.cpp.
References llvm::orc::absoluteSymbols(), llvm::orc::JITDylib::addToLinkOrder(), llvm::cantFail(), llvm::orc::StaticLibraryDefinitionGenerator::Create(), llvm::object::Archive::create(), llvm::orc::JITDylib::define(), llvm::JITSymbolFlags::Exported, llvm::inconvertibleErrorCode(), llvm::make_error(), P, standardPlatformAliases(), llvm::Error::success(), and llvm::orc::symbolAliases().
Referenced by Create(), and llvm::orc::ExecutorNativePlatform::operator()().
◆ getExecutionSession()
| ExecutionSession & llvm::orc::COFFPlatform::getExecutionSession ( ) const | inline |
|---|
◆ getObjectLinkingLayer()
◆ getSEHFrameSectionName()
| StringRef llvm::orc::COFFPlatform::getSEHFrameSectionName ( ) | inlinestatic |
|---|
◆ notifyAdding()
◆ notifyRemoving()
◆ requiredCXXAliases()
◆ setupJITDylib()
| Error llvm::orc::COFFPlatform::setupJITDylib ( JITDylib & JD) | overridevirtual |
|---|
This method will be called outside the session lock each time a JITDylib is created (unless it is created with EmptyJITDylib set) to allow the Platform to install any JITDylib specific standard symbols (e.g __dso_handle).
Implements llvm::orc::Platform.
Definition at line 264 of file COFFPlatform.cpp.
References llvm::orc::addAliases(), llvm::orc::JITDylib::addGenerator(), llvm::orc::DLLImportDefinitionGenerator::Create(), llvm::orc::JITDylib::define(), llvm::MemoryBuffer::getMemBuffer(), llvm::orc::getObjectFileInterface(), I, llvm::Lib, requiredCXXAliases(), llvm::Error::success(), and llvm::orc::symbolAliases().
◆ standardPlatformAliases()
◆ standardRuntimeUtilityAliases()
◆ teardownJITDylib()
| Error llvm::orc::COFFPlatform::teardownJITDylib ( JITDylib & JD) | overridevirtual |
|---|
The documentation for this class was generated from the following files:
- include/llvm/ExecutionEngine/Orc/COFFPlatform.h
- lib/ExecutionEngine/Orc/COFFPlatform.cpp