LLVM  7.0.0svn
Classes | Public Types | Public Member Functions | Friends | List of all members
llvm::orc::VSO Class Reference

A symbol table that supports asynchoronous symbol queries. More...

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

Public Types

using AsynchronousSymbolQuerySet = std::set< std::shared_ptr< AsynchronousSymbolQuery > >
 
using MaterializationUnitList = std::vector< std::unique_ptr< MaterializationUnit > >
 
using VSOList = std::vector< VSO * >
 

Public Member Functions

 VSO (const VSO &)=delete
 
VSOoperator= (const VSO &)=delete
 
 VSO (VSO &&)=delete
 
VSOoperator= (VSO &&)=delete
 
const std::string & getName () const
 Get the name for this VSO. More...
 
ExecutionSessionBasegetExecutionSession () const
 Get a reference to the ExecutionSession for this VSO. More...
 
template<typename UniquePtrToMaterializationUnit >
std::enable_if< std::is_convertible< typename std::decay< UniquePtrToMaterializationUnit >::type, std::unique_ptr< MaterializationUnit > >::value, Error >::type define (UniquePtrToMaterializationUnit &&MU)
 Define all symbols provided by the materialization unit to be part of the given VSO. More...
 
SymbolNameSet lookupFlags (SymbolFlagsMap &Flags, const SymbolNameSet &Names)
 Search the given VSO for the symbols in Symbols. More...
 
SymbolNameSet lookup (std::shared_ptr< AsynchronousSymbolQuery > Q, SymbolNameSet Names)
 Search the given VSOs in order for the symbols in Symbols. More...
 
void dump (raw_ostream &OS)
 Dump current VSO state to OS. More...
 

Friends

class AsynchronousSymbolQuery
 
class ExecutionSession
 
class MaterializationResponsibility
 

Detailed Description

A symbol table that supports asynchoronous symbol queries.

Represents a virtual shared object. Instances can not be copied or moved, so their addresses may be used as keys for resource management. VSO state changes must be made via an ExecutionSession to guarantee that they are synchronized with respect to other VSO operations.

Definition at line 468 of file Core.h.

Member Typedef Documentation

◆ AsynchronousSymbolQuerySet

Definition at line 474 of file Core.h.

◆ MaterializationUnitList

using llvm::orc::VSO::MaterializationUnitList = std::vector<std::unique_ptr<MaterializationUnit> >

Definition at line 477 of file Core.h.

◆ VSOList

using llvm::orc::VSO::VSOList = std::vector<VSO *>

Definition at line 479 of file Core.h.

Constructor & Destructor Documentation

◆ VSO() [1/2]

llvm::orc::VSO::VSO ( const VSO )
delete

◆ VSO() [2/2]

llvm::orc::VSO::VSO ( VSO &&  )
delete

Member Function Documentation

◆ define()

template<typename UniquePtrToMaterializationUnit >
std::enable_if< std::is_convertible< typename std::decay<UniquePtrToMaterializationUnit>::type, std::unique_ptr<MaterializationUnit> >::value, Error>::type llvm::orc::VSO::define ( UniquePtrToMaterializationUnit &&  MU)
inline

Define all symbols provided by the materialization unit to be part of the given VSO.

defineImpl succeeded.

Definition at line 500 of file Core.h.

References assert(), llvm::dump(), finalize, llvm::orc::lookup(), llvm::object::replace(), and llvm::Error::success().

Referenced by llvm::orc::IRLayer::add(), and llvm::orc::ObjectLayer::add().

◆ dump()

void llvm::orc::VSO::dump ( raw_ostream OS)

◆ getExecutionSession()

ExecutionSessionBase& llvm::orc::VSO::getExecutionSession ( ) const
inline

Get a reference to the ExecutionSession for this VSO.

Definition at line 490 of file Core.h.

◆ getName()

const std::string& llvm::orc::VSO::getName ( ) const
inline

Get the name for this VSO.

Definition at line 487 of file Core.h.

◆ lookup()

SymbolNameSet llvm::orc::VSO::lookup ( std::shared_ptr< AsynchronousSymbolQuery Q,
SymbolNameSet  Names 
)

Search the given VSOs in order for the symbols in Symbols.

Results (once they become available) will be returned via the given Query.

If any symbol is not found then the unresolved symbols will be returned, and the query will not be applied. The Query is not failed and can be re-used in a subsequent lookup once the symbols have been added, or manually failed.

Definition at line 630 of file Core.cpp.

References assert(), E, I, llvm::JITSymbolFlags::Materializing, and MI.

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

◆ lookupFlags()

SymbolNameSet llvm::orc::VSO::lookupFlags ( SymbolFlagsMap Flags,
const SymbolNameSet Names 
)

Search the given VSO for the symbols in Symbols.

If found, store the flags for each symbol in Flags. Returns any unresolved symbols.

Definition at line 610 of file Core.cpp.

References assert(), I, and llvm::JITSymbolFlags::stripTransientFlags().

◆ operator=() [1/2]

VSO& llvm::orc::VSO::operator= ( const VSO )
delete

◆ operator=() [2/2]

VSO& llvm::orc::VSO::operator= ( VSO &&  )
delete

Friends And Related Function Documentation

◆ AsynchronousSymbolQuery

friend class AsynchronousSymbolQuery
friend

Definition at line 469 of file Core.h.

◆ ExecutionSession

friend class ExecutionSession
friend

Definition at line 470 of file Core.h.

◆ MaterializationResponsibility

friend class MaterializationResponsibility
friend

Definition at line 471 of file Core.h.


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