LLVM  14.0.0git
Public Member Functions | Static Public Attributes | Protected Attributes | Friends | List of all members
llvm::orc::MaterializationUnit Class Referenceabstract

A MaterializationUnit represents a set of symbol definitions that can be materialized as a group, or individually discarded (when overriding definitions are encountered). More...

#include "llvm/ExecutionEngine/Orc/Core.h"

Inheritance diagram for llvm::orc::MaterializationUnit:
Inheritance graph
[legend]
Collaboration diagram for llvm::orc::MaterializationUnit:
Collaboration graph
[legend]

Public Member Functions

 MaterializationUnit (SymbolFlagsMap InitalSymbolFlags, SymbolStringPtr InitSymbol)
 
virtual ~MaterializationUnit ()
 
virtual StringRef getName () const =0
 Return the name of this materialization unit. More...
 
const SymbolFlagsMapgetSymbols () const
 Return the set of symbols that this source provides. More...
 
const SymbolStringPtrgetInitializerSymbol () const
 Returns the initialization symbol for this MaterializationUnit (if any). More...
 
virtual void materialize (std::unique_ptr< MaterializationResponsibility > R)=0
 Implementations of this method should materialize all symbols in the materialzation unit, except for those that have been previously discarded. More...
 
void doDiscard (const JITDylib &JD, const SymbolStringPtr &Name)
 Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden. More...
 

Static Public Attributes

static char ID
 

Protected Attributes

SymbolFlagsMap SymbolFlags
 
SymbolStringPtr InitSymbol
 

Friends

class ExecutionSession
 
class JITDylib
 

Detailed Description

A MaterializationUnit represents a set of symbol definitions that can be materialized as a group, or individually discarded (when overriding definitions are encountered).

MaterializationUnits are used when providing lazy definitions of symbols to JITDylibs. The JITDylib will call materialize when the address of a symbol is requested via the lookup method. The JITDylib will call discard if a stronger definition is added or already present.

Definition at line 650 of file Core.h.

Constructor & Destructor Documentation

◆ MaterializationUnit()

llvm::orc::MaterializationUnit::MaterializationUnit ( SymbolFlagsMap  InitalSymbolFlags,
SymbolStringPtr  InitSymbol 
)
inline

◆ ~MaterializationUnit()

virtual llvm::orc::MaterializationUnit::~MaterializationUnit ( )
inlinevirtual

Definition at line 665 of file Core.h.

Member Function Documentation

◆ doDiscard()

void llvm::orc::MaterializationUnit::doDiscard ( const JITDylib JD,
const SymbolStringPtr Name 
)
inline

Called by JITDylibs to notify MaterializationUnits that the given symbol has been overridden.

Definition at line 685 of file Core.h.

References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::erase(), move, and SymbolFlags.

◆ getInitializerSymbol()

const SymbolStringPtr& llvm::orc::MaterializationUnit::getInitializerSymbol ( ) const
inline

Returns the initialization symbol for this MaterializationUnit (if any).

Definition at line 675 of file Core.h.

References InitSymbol.

Referenced by llvm::orc::MachOPlatform::notifyAdding().

◆ getName()

virtual StringRef llvm::orc::MaterializationUnit::getName ( ) const
pure virtual

◆ getSymbols()

const SymbolFlagsMap& llvm::orc::MaterializationUnit::getSymbols ( ) const
inline

Return the set of symbols that this source provides.

Definition at line 672 of file Core.h.

References SymbolFlags.

Referenced by llvm::orc::operator<<().

◆ materialize()

virtual void llvm::orc::MaterializationUnit::materialize ( std::unique_ptr< MaterializationResponsibility R)
pure virtual

Implementations of this method should materialize all symbols in the materialzation unit, except for those that have been previously discarded.

Friends And Related Function Documentation

◆ ExecutionSession

friend class ExecutionSession
friend

Definition at line 651 of file Core.h.

◆ JITDylib

friend class JITDylib
friend

Definition at line 652 of file Core.h.

Member Data Documentation

◆ ID

char llvm::orc::MaterializationUnit::ID
static

Definition at line 655 of file Core.h.

◆ InitSymbol

SymbolStringPtr llvm::orc::MaterializationUnit::InitSymbol
protected

◆ SymbolFlags

SymbolFlagsMap llvm::orc::MaterializationUnit::SymbolFlags
protected

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