LLVM 18.0.0git
|
#include "llvm/ExecutionEngine/Orc/EPCDynamicLibrarySearchGenerator.h"
Public Types | |
using | SymbolPredicate = unique_function< bool(const SymbolStringPtr &)> |
Public Member Functions | |
EPCDynamicLibrarySearchGenerator (ExecutionSession &ES, tpctypes::DylibHandle H, SymbolPredicate Allow=SymbolPredicate()) | |
Create a DynamicLibrarySearchGenerator that searches for symbols in the library with the given handle. | |
Error | tryToGenerate (LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &Symbols) override |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. | |
![]() | |
virtual | ~DefinitionGenerator () |
virtual Error | tryToGenerate (LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &LookupSet)=0 |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. | |
Static Public Member Functions | |
static Expected< std::unique_ptr< EPCDynamicLibrarySearchGenerator > > | Load (ExecutionSession &ES, const char *LibraryPath, SymbolPredicate Allow=SymbolPredicate()) |
Permanently loads the library at the given path and, on success, returns a DynamicLibrarySearchGenerator that will search it for symbol definitions in the library. | |
static Expected< std::unique_ptr< EPCDynamicLibrarySearchGenerator > > | GetForTargetProcess (ExecutionSession &ES, SymbolPredicate Allow=SymbolPredicate()) |
Creates a EPCDynamicLibrarySearchGenerator that searches for symbols in the target process. | |
Definition at line 25 of file EPCDynamicLibrarySearchGenerator.h.
using llvm::orc::EPCDynamicLibrarySearchGenerator::SymbolPredicate = unique_function<bool(const SymbolStringPtr &)> |
Definition at line 27 of file EPCDynamicLibrarySearchGenerator.h.
|
inline |
Create a DynamicLibrarySearchGenerator that searches for symbols in the library with the given handle.
If the Allow predicate is given then only symbols matching the predicate will be searched for. If the predicate is not given then all symbols will be searched for.
Definition at line 35 of file EPCDynamicLibrarySearchGenerator.h.
References H.
|
inlinestatic |
Creates a EPCDynamicLibrarySearchGenerator that searches for symbols in the target process.
Definition at line 50 of file EPCDynamicLibrarySearchGenerator.h.
References Load().
|
static |
Permanently loads the library at the given path and, on success, returns a DynamicLibrarySearchGenerator that will search it for symbol definitions in the library.
On failure returns the reason the library failed to load.
Definition at line 15 of file EPCDynamicLibrarySearchGenerator.cpp.
References llvm::orc::ExecutionSession::getExecutorProcessControl(), and llvm::orc::ExecutorProcessControl::loadDylib().
Referenced by GetForTargetProcess(), and llvm::orc::LLJIT::loadPlatformDynamicLibrary().
|
overridevirtual |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib.
K specifies the kind of this lookup. JD specifies the target JITDylib being searched, and JDLookupFlags specifies whether the search should match against hidden symbols. Finally, Symbols describes the set of unresolved symbols and their associated lookup flags.
Implements llvm::orc::DefinitionGenerator.
Definition at line 26 of file EPCDynamicLibrarySearchGenerator.cpp.
References llvm::orc::absoluteSymbols(), llvm::orc::SymbolLookupSet::add(), assert(), llvm::orc::JITDylib::define(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::JITSymbolFlags::Exported, llvm::orc::ExecutorProcessControl::lookupSymbols(), llvm::orc::Result, llvm::orc::SymbolLookupSet::size(), llvm::Error::success(), and llvm::orc::WeaklyReferencedSymbol.