LLVM 20.0.0git
|
Platforms set up standard symbols and mediate interactions between dynamic initializers (e.g. More...
#include "llvm/ExecutionEngine/Orc/Core.h"
Public Member Functions | |
virtual | ~Platform () |
virtual Error | setupJITDylib (JITDylib &JD)=0 |
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). | |
virtual Error | teardownJITDylib (JITDylib &JD)=0 |
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. | |
virtual Error | notifyAdding (ResourceTracker &RT, const MaterializationUnit &MU)=0 |
This method will be called under the ExecutionSession lock each time a MaterializationUnit is added to a JITDylib. | |
virtual Error | notifyRemoving (ResourceTracker &RT)=0 |
This method will be called under the ExecutionSession lock when a ResourceTracker is removed. | |
Static Public Member Functions | |
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. | |
Platforms set up standard symbols and mediate interactions between dynamic initializers (e.g.
C++ static constructors) and ExecutionSession state. Note that Platforms do not automatically run initializers: clients are still responsible for doing this.
|
virtualdefault |
|
static |
A utility function for looking up initializer symbols.
Performs a blocking lookup for the given symbols in each of the given JITDylibs.
Note: This function is deprecated and will be removed in the near future.
Definition at line 1509 of file Core.cpp.
References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), llvm::joinErrors(), LLVM_DEBUG, llvm::orc::ExecutionSession::lookup(), llvm::orc::MatchAllSymbols, llvm::orc::NoDependenciesToRegister, llvm::orc::Ready, llvm::orc::Result, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::size(), llvm::orc::Static, and llvm::Error::success().
|
static |
Performs an async lookup for the given symbols in each of the given JITDylibs, calling the given handler once all lookups have completed.
Definition at line 1558 of file Core.cpp.
References llvm::dbgs(), llvm::joinErrors(), LLVM_DEBUG, llvm::orc::ExecutionSession::lookup(), llvm::orc::MatchAllSymbols, llvm::orc::NoDependenciesToRegister, llvm::orc::Ready, llvm::orc::Result, and llvm::orc::Static.
|
pure virtual |
This method will be called under the ExecutionSession lock each time a MaterializationUnit is added to a JITDylib.
Implemented in llvm::orc::COFFPlatform, llvm::orc::ELFNixPlatform, and llvm::orc::MachOPlatform.
|
pure virtual |
This method will be called under the ExecutionSession lock when a ResourceTracker is removed.
Implemented in llvm::orc::COFFPlatform, llvm::orc::ELFNixPlatform, and llvm::orc::MachOPlatform.
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).
Implemented in llvm::orc::COFFPlatform, llvm::orc::ELFNixPlatform, and llvm::orc::MachOPlatform.
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.
Implemented in llvm::orc::COFFPlatform, llvm::orc::ELFNixPlatform, and llvm::orc::MachOPlatform.