LLVM 20.0.0git
Public Types | Public Member Functions | List of all members
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:
Inheritance graph
[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 ()
 
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.
 

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 1997 of file Core.h.

Member Typedef Documentation

◆ SymbolPredicate

Definition at line 1999 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 611 of file Core.cpp.

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 617 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: