LLVM  12.0.0git
Public Member Functions | 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, VModuleKey K)
 
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 (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...
 

Protected Attributes

SymbolFlagsMap SymbolFlags
 
SymbolStringPtr InitSymbol
 
VModuleKey K
 

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

Constructor & Destructor Documentation

◆ MaterializationUnit()

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

Definition at line 557 of file Core.h.

References assert().

◆ ~MaterializationUnit()

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

Definition at line 565 of file Core.h.

References getName().

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

Referenced by llvm::orc::JITDylib::dump().

◆ getInitializerSymbol()

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

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

Definition at line 575 of file Core.h.

References llvm::RISCVFenceField::R.

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

Referenced by llvm::orc::JITDylib::dump(), and llvm::orc::operator<<().

◆ materialize()

virtual void llvm::orc::MaterializationUnit::materialize ( 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 553 of file Core.h.

◆ JITDylib

friend class JITDylib
friend

Definition at line 554 of file Core.h.

Member Data Documentation

◆ InitSymbol

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

Definition at line 591 of file Core.h.

Referenced by llvm::orc::IRMaterializationUnit::IRMaterializationUnit().

◆ K

VModuleKey llvm::orc::MaterializationUnit::K
protected

◆ SymbolFlags

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

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