LLVM  12.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]
Collaboration diagram for llvm::orc::ReexportsGenerator:
Collaboration 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. More...
 
Error tryToGenerate (LookupKind K, JITDylib &JD, JITDylibLookupFlags JDLookupFlags, const SymbolLookupSet &LookupSet) override
 DefinitionGenerators should override this method to insert new definitions into the parent JITDylib. More...
 
- Public Member Functions inherited from llvm::orc::JITDylib::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 1380 of file Core.h.

Member Typedef Documentation

◆ SymbolPredicate

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

Member Function Documentation

◆ tryToGenerate()

Error llvm::orc::ReexportsGenerator::tryToGenerate ( 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::JITDylib::DefinitionGenerator.

Definition at line 570 of file Core.cpp.

References assert(), llvm::orc::JITDylib::define(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::empty(), llvm::orc::JITDylib::lookupFlags(), llvm::orc::reexports(), and llvm::Error::success().


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