LLVM 20.0.0git
Classes | Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::orc::LazyReexportsManager Class Reference

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

Inheritance diagram for llvm::orc::LazyReexportsManager:
Inheritance graph
[legend]

Classes

class  MU
 
class  Plugin
 

Public Types

using OnTrampolinesReadyFn = unique_function< void(Expected< std::vector< ExecutorSymbolDef > > EntryAddrs)>
 
using EmitTrampolinesFn = unique_function< void(ResourceTrackerSP RT, size_t NumTrampolines, OnTrampolinesReadyFn OnTrampolinesReady)>
 

Public Member Functions

 LazyReexportsManager (LazyReexportsManager &&)=delete
 
LazyReexportsManageroperator= (LazyReexportsManager &&)=delete
 
Error handleRemoveResources (JITDylib &JD, ResourceKey K) override
 This function will be called outside the session lock.
 
void handleTransferResources (JITDylib &JD, ResourceKey DstK, ResourceKey SrcK) override
 This function will be called inside the session lock.
 
- Public Member Functions inherited from llvm::orc::ResourceManager
virtual ~ResourceManager ()
 
virtual Error handleRemoveResources (JITDylib &JD, ResourceKey K)=0
 This function will be called outside the session lock.
 
virtual void handleTransferResources (JITDylib &JD, ResourceKey DstK, ResourceKey SrcK)=0
 This function will be called inside the session lock.
 

Static Public Member Functions

static Expected< std::unique_ptr< LazyReexportsManager > > Create (EmitTrampolinesFn EmitTrampolines, RedirectableSymbolManager &RSMgr, JITDylib &PlatformJD)
 Create a LazyReexportsManager that uses the ORC runtime for reentry.
 

Friends

std::unique_ptr< MaterializationUnitlazyReexports (LazyReexportsManager &, SymbolAliasMap)
 Define lazy-reexports based on the given SymbolAliasMap.
 

Detailed Description

Definition at line 176 of file LazyReexports.h.

Member Typedef Documentation

◆ EmitTrampolinesFn

Definition at line 184 of file LazyReexports.h.

◆ OnTrampolinesReadyFn

Definition at line 182 of file LazyReexports.h.

Constructor & Destructor Documentation

◆ LazyReexportsManager()

llvm::orc::LazyReexportsManager::LazyReexportsManager ( LazyReexportsManager &&  )
delete

Member Function Documentation

◆ Create()

Expected< std::unique_ptr< LazyReexportsManager > > llvm::orc::LazyReexportsManager::Create ( EmitTrampolinesFn  EmitTrampolines,
RedirectableSymbolManager RSMgr,
JITDylib PlatformJD 
)
static

Create a LazyReexportsManager that uses the ORC runtime for reentry.

This will work both in-process and out-of-process.

Definition at line 284 of file LazyReexports.cpp.

References llvm::Error::success().

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

◆ handleRemoveResources()

Error llvm::orc::LazyReexportsManager::handleRemoveResources ( JITDylib JD,
ResourceKey  K 
)
overridevirtual

This function will be called outside the session lock.

ResourceManagers should perform book-keeping under the session lock, and any expensive cleanup outside the session lock.

Implements llvm::orc::ResourceManager.

Definition at line 295 of file LazyReexports.cpp.

References llvm::orc::JITDylib::getExecutionSession(), I, and llvm::orc::ExecutionSession::runSessionLocked().

◆ handleTransferResources()

void llvm::orc::LazyReexportsManager::handleTransferResources ( JITDylib JD,
ResourceKey  DstK,
ResourceKey  SrcK 
)
overridevirtual

This function will be called inside the session lock.

ResourceManagers DO NOT need to re-lock the session.

Implements llvm::orc::ResourceManager.

Definition at line 310 of file LazyReexports.cpp.

References I.

◆ operator=()

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

Friends And Related Function Documentation

◆ lazyReexports

std::unique_ptr< MaterializationUnit > lazyReexports ( LazyReexportsManager LRM,
SymbolAliasMap  Reexports 
)
friend

Define lazy-reexports based on the given SymbolAliasMap.

Each lazy re-export is a callable symbol that will look up and dispatch to the given aliasee on first call. All subsequent calls will go directly to the aliasee.

Definition at line 241 of file LazyReexports.h.


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