LLVM 22.0.0git
|
ReexportsGenerator can be used with JITDylib::addGenerator to automatically re-export a subset of the source JITDylib's symbols in the target. More...
#include "llvm/ExecutionEngine/Orc/Core.h"
Public Types | |
using | SymbolPredicate = std::function<bool(SymbolStringPtr)> |
Public Member Functions | |
ReexportsGenerator (JITDylib &SourceJD, JITDylibLookupFlags SourceJDLookupFlags, SymbolPredicate Allow=SymbolPredicate()) | |
Create a reexports generator. | |
Error | tryToGenerate (LookupState &LS, LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &LookupSet) override |
DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. | |
Public Member Functions inherited from llvm::orc::DefinitionGenerator | |
virtual | ~DefinitionGenerator () |
ReexportsGenerator can be used with JITDylib::addGenerator to automatically re-export a subset of the source JITDylib's symbols in the target.
using llvm::orc::ReexportsGenerator::SymbolPredicate = std::function<bool(SymbolStringPtr)> |
llvm::orc::ReexportsGenerator::ReexportsGenerator | ( | JITDylib & | SourceJD, |
JITDylibLookupFlags | SourceJDLookupFlags, | ||
SymbolPredicate | Allow = SymbolPredicate() ) |
Create a reexports generator.
If an Allow predicate is passed, only symbols for which the predicate returns true will be reexported. If no Allow predicate is passed, all symbols will be exported.
Definition at line 591 of file Core.cpp.
References llvm::move(), and ReexportsGenerator().
Referenced by ReexportsGenerator().
|
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 597 of file Core.cpp.
References assert(), llvm::orc::JITDylib::define(), llvm::orc::JITDylib::getExecutionSession(), llvm::orc::ExecutionSession::lookupFlags(), llvm::orc::reexports(), and llvm::Error::success().