LLVM  10.0.0svn
Public Types | Public Member Functions | Protected Attributes | List of all members
llvm::orc::IRMaterializationUnit Class Reference

IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR. More...

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

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

Public Types

using SymbolNameToDefinitionMap = std::map< SymbolStringPtr, GlobalValue * >
 

Public Member Functions

 IRMaterializationUnit (ExecutionSession &ES, ThreadSafeModule TSM, VModuleKey K)
 Create an IRMaterializationLayer. More...
 
 IRMaterializationUnit (ThreadSafeModule TSM, VModuleKey K, SymbolFlagsMap SymbolFlags, SymbolNameToDefinitionMap SymbolToDefinition)
 Create an IRMaterializationLayer from a module, and pre-existing SymbolFlags and SymbolToDefinition maps. More...
 
StringRef getName () const override
 Return the ModuleIdentifier as the name for this MaterializationUnit. More...
 
const ThreadSafeModulegetModule () const
 
- Public Member Functions inherited from llvm::orc::MaterializationUnit
 MaterializationUnit (SymbolFlagsMap InitalSymbolFlags, VModuleKey K)
 
virtual ~MaterializationUnit ()
 
const SymbolFlagsMapgetSymbols () const
 Return the set of symbols that this source provides. More...
 
void doMaterialize (JITDylib &JD)
 Called by materialization dispatchers (see ExecutionSession::DispatchMaterializationFunction) to trigger materialization of this MaterializationUnit. 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

ThreadSafeModule TSM
 
SymbolNameToDefinitionMap SymbolToDefinition
 
- Protected Attributes inherited from llvm::orc::MaterializationUnit
SymbolFlagsMap SymbolFlags
 
VModuleKey K
 

Detailed Description

IRMaterializationUnit is a convenient base class for MaterializationUnits wrapping LLVM IR.

Represents materialization responsibility for all symbols in the given module. If symbols are overridden by other definitions, then their linkage is changed to available-externally.

Definition at line 66 of file Layer.h.

Member Typedef Documentation

◆ SymbolNameToDefinitionMap

Definition at line 68 of file Layer.h.

Constructor & Destructor Documentation

◆ IRMaterializationUnit() [1/2]

llvm::orc::IRMaterializationUnit::IRMaterializationUnit ( ExecutionSession ES,
ThreadSafeModule  TSM,
VModuleKey  K 
)

◆ IRMaterializationUnit() [2/2]

llvm::orc::IRMaterializationUnit::IRMaterializationUnit ( ThreadSafeModule  TSM,
VModuleKey  K,
SymbolFlagsMap  SymbolFlags,
SymbolNameToDefinitionMap  SymbolToDefinition 
)

Create an IRMaterializationLayer from a module, and pre-existing SymbolFlags and SymbolToDefinition maps.

The maps must provide entries for each definition in M. This constructor is useful for delegating work from one IRMaterializationUnit to another.

Definition at line 45 of file Layer.cpp.

Member Function Documentation

◆ getModule()

const ThreadSafeModule& llvm::orc::IRMaterializationUnit::getModule ( ) const
inline

Definition at line 87 of file Layer.h.

◆ getName()

StringRef llvm::orc::IRMaterializationUnit::getName ( ) const
overridevirtual

Member Data Documentation

◆ SymbolToDefinition

SymbolNameToDefinitionMap llvm::orc::IRMaterializationUnit::SymbolToDefinition
protected

◆ TSM

ThreadSafeModule llvm::orc::IRMaterializationUnit::TSM
protected

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