LLVM: llvm::orc::DynamicLibrarySearchGenerator Class Reference (original) (raw)

A utility class to expose symbols found via dlsym to the JIT. More...

#include "[llvm/ExecutionEngine/Orc/ExecutionUtils.h](ExecutionUtils%5F8h%5Fsource.html)"

Public Member Functions
DynamicLibrarySearchGenerator (sys::DynamicLibrary Dylib, char GlobalPrefix, SymbolPredicate Allow=SymbolPredicate(), AddAbsoluteSymbolsFn AddAbsoluteSymbols=nullptr)
Create a DynamicLibrarySearchGenerator that searches for symbols in the given sys::DynamicLibrary.
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.
Public Member Functions inherited from llvm::orc::DefinitionGenerator
virtual ~DefinitionGenerator ()

A utility class to expose symbols found via dlsym to the JIT.

If an instance of this class is attached to a JITDylib as a fallback definition generator, then any symbol found in the given DynamicLibrary that passes the 'Allow' predicate will be added to the JITDylib.

Definition at line 217 of file ExecutionUtils.h.

AddAbsoluteSymbolsFn

SymbolPredicate

llvm::orc::DynamicLibrarySearchGenerator::DynamicLibrarySearchGenerator ( sys::DynamicLibrary Dylib,
char GlobalPrefix,
SymbolPredicate Allow = SymbolPredicate(),
AddAbsoluteSymbolsFn AddAbsoluteSymbols = nullptr )

Create a DynamicLibrarySearchGenerator that searches for symbols in the given sys::DynamicLibrary.

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.

If AddAbsoluteSymbols is provided, it is used to add the symbols to the [JITDylib](classllvm%5F1%5F1orc%5F1%5F1JITDylib.html "Represents a JIT'd dynamic library."); otherwise it uses JD.define(absoluteSymbols(...)).

Definition at line 221 of file ExecutionUtils.cpp.

References llvm::move().

GetForCurrentProcess()

Load()

tryToGenerate()

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 241 of file ExecutionUtils.cpp.

References llvm::orc::absoluteSymbols(), llvm::orc::JITDylib::define(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::JITSymbolFlags::Exported, llvm::orc::ExecutorAddr::fromPtr(), P, and llvm::Error::success().


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