LLVM  10.0.0
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | List of all members
llvm::jitlink::JITLinkerBase Class Referenceabstract

Base class for a JIT linker. More...

#include "ExecutionEngine/JITLink/JITLinkGeneric.h"

Inheritance diagram for llvm::jitlink::JITLinkerBase:
[legend]

Classes

struct  SegmentLayout
 

Public Member Functions

 JITLinkerBase (std::unique_ptr< JITLinkContext > Ctx, PassConfiguration Passes)
 
virtual ~JITLinkerBase ()
 

Protected Types

using SegmentLayoutMap = DenseMap< unsigned, SegmentLayout >
 

Protected Member Functions

void linkPhase1 (std::unique_ptr< JITLinkerBase > Self)
 
void linkPhase2 (std::unique_ptr< JITLinkerBase > Self, Expected< AsyncLookupResult > LookupResult, SegmentLayoutMap Layout)
 
void linkPhase3 (std::unique_ptr< JITLinkerBase > Self, Error Err)
 
virtual Expected< std::unique_ptr< LinkGraph > > buildGraph (MemoryBufferRef ObjBuffer)=0
 
virtual StringRef getEdgeKindName (Edge::Kind K) const =0
 

Static Protected Member Functions

static JITTargetAddress alignToBlock (JITTargetAddress Addr, Block &B)
 
static char * alignToBlock (char *P, Block &B)
 

Detailed Description

Base class for a JIT linker.

A JITLinkerBase instance links one object file into an ongoing JIT session. Symbol resolution and finalization operations are pluggable, and called using continuation passing (passing a continuation for the remaining linker work) to allow them to be performed asynchronously.

Definition at line 33 of file JITLinkGeneric.h.

Member Typedef Documentation

◆ SegmentLayoutMap

Definition at line 50 of file JITLinkGeneric.h.

Constructor & Destructor Documentation

◆ JITLinkerBase()

llvm::jitlink::JITLinkerBase::JITLinkerBase ( std::unique_ptr< JITLinkContext >  Ctx,
PassConfiguration  Passes 
)
inline

Definition at line 35 of file JITLinkGeneric.h.

References assert(), and ~JITLinkerBase().

◆ ~JITLinkerBase()

llvm::jitlink::JITLinkerBase::~JITLinkerBase ( )
virtual

Definition at line 23 of file JITLinkGeneric.cpp.

Referenced by JITLinkerBase().

Member Function Documentation

◆ alignToBlock() [1/2]

static JITTargetAddress llvm::jitlink::JITLinkerBase::alignToBlock ( JITTargetAddress  Addr,
Block &  B 
)
inlinestaticprotected

◆ alignToBlock() [2/2]

static char* llvm::jitlink::JITLinkerBase::alignToBlock ( char *  P,
Block &  B 
)
inlinestaticprotected

◆ buildGraph()

virtual Expected<std::unique_ptr<LinkGraph> > llvm::jitlink::JITLinkerBase::buildGraph ( MemoryBufferRef  ObjBuffer)
protectedpure virtual

Referenced by linkPhase1().

◆ getEdgeKindName()

virtual StringRef llvm::jitlink::JITLinkerBase::getEdgeKindName ( Edge::Kind  K) const
protectedpure virtual

◆ linkPhase1()

void llvm::jitlink::JITLinkerBase::linkPhase1 ( std::unique_ptr< JITLinkerBase >  Self)
protected

Definition at line 25 of file JITLinkGeneric.cpp.

References assert(), and buildGraph().

◆ linkPhase2()

void llvm::jitlink::JITLinkerBase::linkPhase2 ( std::unique_ptr< JITLinkerBase >  Self,
Expected< AsyncLookupResult >  LookupResult,
SegmentLayoutMap  Layout 
)
protected

Definition at line 87 of file JITLinkGeneric.cpp.

References llvm::dbgs(), LLVM_DEBUG, and llvm::Expected< T >::takeError().

◆ linkPhase3()

void llvm::jitlink::JITLinkerBase::linkPhase3 ( std::unique_ptr< JITLinkerBase >  Self,
Error  Err 
)
protected

Definition at line 124 of file JITLinkGeneric.cpp.


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