LLVM 22.0.0git
llvm::orc::IndirectStubsManager Class Referenceabstract

Base class for managing collections of named indirect stubs. More...

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

Inheritance diagram for llvm::orc::IndirectStubsManager:
[legend]

Public Types

using StubInitsMap = StringMap<std::pair<ExecutorAddr, JITSymbolFlags>>
 Map type for initializing the manager. See init.

Public Member Functions

virtual ~IndirectStubsManager ()=default
virtual Error createStub (StringRef StubName, ExecutorAddr StubAddr, JITSymbolFlags StubFlags)=0
 Create a single stub with the given name, target address and flags.
virtual Error createStubs (const StubInitsMap &StubInits)=0
 Create StubInits.size() stubs with the given names, target addresses, and flags.
virtual ExecutorSymbolDef findStub (StringRef Name, bool ExportedStubsOnly)=0
 Find the stub with the given name.
virtual ExecutorSymbolDef findPointer (StringRef Name)=0
 Find the implementation-pointer for the stub.
virtual Error updatePointer (StringRef Name, ExecutorAddr NewAddr)=0
 Change the value of the implementation pointer for the stub.
Error redirect (JITDylib &JD, const SymbolMap &NewDests) override
 RedirectableSymbolManager implementation —
void emitRedirectableSymbols (std::unique_ptr< MaterializationResponsibility > MR, SymbolMap InitialDests) override
 Emit redirectable symbol.
Public Member Functions inherited from llvm::orc::RedirectableSymbolManager
LLVM_ABI Error createRedirectableSymbols (ResourceTrackerSP RT, SymbolMap InitialDests)
 Create redirectable symbols with given symbol names and initial desitnation symbol addresses.
Error createRedirectableSymbol (ResourceTrackerSP RT, SymbolStringPtr Symbol, ExecutorSymbolDef InitialDest)
 Create a single redirectable symbol with given symbol name and initial desitnation symbol address.
Public Member Functions inherited from llvm::orc::RedirectionManager
virtual ~RedirectionManager ()=default
Error redirect (JITDylib &JD, SymbolStringPtr Symbol, ExecutorSymbolDef NewDest)
 Change the redirection destination of given symbol to new destination symbol.

Detailed Description

Base class for managing collections of named indirect stubs.

Definition at line 283 of file IndirectionUtils.h.

Member Typedef Documentation

◆ StubInitsMap

Map type for initializing the manager. See init.

Definition at line 286 of file IndirectionUtils.h.

Constructor & Destructor Documentation

◆ ~IndirectStubsManager()

virtual llvm::orc::IndirectStubsManager::~IndirectStubsManager ( )
virtualdefault

Member Function Documentation

◆ createStub()

virtual Error llvm::orc::IndirectStubsManager::createStub ( StringRef StubName,
ExecutorAddr StubAddr,
JITSymbolFlags StubFlags )
pure virtual

Create a single stub with the given name, target address and flags.

Implemented in llvm::orc::LocalIndirectStubsManager< TargetT >.

◆ createStubs()

virtual Error llvm::orc::IndirectStubsManager::createStubs ( const StubInitsMap & StubInits)
pure virtual

Create StubInits.size() stubs with the given names, target addresses, and flags.

Implemented in llvm::orc::LocalIndirectStubsManager< TargetT >.

Referenced by emitRedirectableSymbols().

◆ emitRedirectableSymbols()

void llvm::orc::IndirectStubsManager::emitRedirectableSymbols ( std::unique_ptr< MaterializationResponsibility > MR,
SymbolMap InitialDests )
overridevirtual

Emit redirectable symbol.

Implements llvm::orc::RedirectableSymbolManager.

Definition at line 122 of file IndirectionUtils.cpp.

References assert(), createStubs(), and findStub().

Referenced by updatePointer().

◆ findPointer()

virtual ExecutorSymbolDef llvm::orc::IndirectStubsManager::findPointer ( StringRef Name)
pure virtual

Find the implementation-pointer for the stub.

Implemented in llvm::orc::LocalIndirectStubsManager< TargetT >.

◆ findStub()

virtual ExecutorSymbolDef llvm::orc::IndirectStubsManager::findStub ( StringRef Name,
bool ExportedStubsOnly )
pure virtual

Find the stub with the given name.

If ExportedStubsOnly is true, this will only return a result if the stub's flags indicate that it is exported.

Implemented in llvm::orc::LocalIndirectStubsManager< TargetT >.

Referenced by emitRedirectableSymbols().

◆ redirect()

Error llvm::orc::IndirectStubsManager::redirect ( JITDylib & JD,
const SymbolMap & NewDests )
overridevirtual

RedirectableSymbolManager implementation —

Implements llvm::orc::RedirectionManager.

Definition at line 115 of file IndirectionUtils.cpp.

References llvm::Error::success(), and updatePointer().

Referenced by updatePointer().

◆ updatePointer()

virtual Error llvm::orc::IndirectStubsManager::updatePointer ( StringRef Name,
ExecutorAddr NewAddr )
pure virtual

Change the value of the implementation pointer for the stub.

Implemented in llvm::orc::LocalIndirectStubsManager< TargetT >.

References emitRedirectableSymbols(), and redirect().

Referenced by redirect().


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