LLVM 22.0.0git
llvm::orc::ReexportsGenerator Class Reference

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"

Inheritance diagram for llvm::orc::ReexportsGenerator:
[legend]

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 ()

Detailed Description

ReexportsGenerator can be used with JITDylib::addGenerator to automatically re-export a subset of the source JITDylib's symbols in the target.

Definition at line 1969 of file Core.h.

Member Typedef Documentation

◆ SymbolPredicate

Definition at line 1971 of file Core.h.

Constructor & Destructor Documentation

◆ ReexportsGenerator()

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().

Member Function Documentation

◆ tryToGenerate()

Error llvm::orc::ReexportsGenerator::tryToGenerate ( LookupState & LS,
LookupKind K,
JITDylib & JD,
JITDylibLookupFlags JDLookupFlags,
const SymbolLookupSet & LookupSet )
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().


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