LLVM 20.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 () |
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. | |
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() |
||
) |
|
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 598 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().