LLVM 24.0.0git
llvm::orc::EPCGenericDylibManager Class Reference

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

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

Classes

struct  Bindings
 The resolved controller-side handle to an executor-side dylib manager: the address of the manager instance (passed as the first argument to each call) plus the proxies for its functions. More...

Public Types

using OpenProxy
 Proxy for the executor-side dylib-open function.
using ResolveProxy
 Proxy for the executor-side symbol-resolution function.
using SymbolLookupCompleteFn
Public Types inherited from llvm::orc::DylibManager
using SymbolLookupCompleteFn

Public Member Functions

 EPCGenericDylibManager (ExecutionSession &ES, Bindings B)
 Create an EPCGenericDylibManager instance from a given set of dylib-manager bindings.
Expected< tpctypes::DylibHandleopen (StringRef Path, uint64_t Mode)
 Loads the dylib with the given name.
Expected< tpctypes::LookupResultlookup (tpctypes::DylibHandle H, const SymbolLookupSet &Lookup)
 Looks up symbols within the given dylib.
void lookupAsync (tpctypes::DylibHandle H, const SymbolLookupSet &Lookup, SymbolLookupCompleteFn Complete)
 Looks up symbols within the given dylib.
Expected< tpctypes::DylibHandleloadDylib (const char *DylibPath) override
 Load the dynamic library at the given path and return a handle to it.
void lookupSymbolsAsync (tpctypes::DylibHandle H, const SymbolLookupSet &Symbols, DylibManager::SymbolLookupCompleteFn Complete) override
 Search for symbols in the target process.
Public Member Functions inherited from llvm::orc::DylibManager
virtual ~DylibManager ()
Expected< tpctypes::LookupResultlookupSymbols (tpctypes::DylibHandle H, const SymbolLookupSet &Symbols)
 Search for symbols in the target process.

Static Public Member Functions

static Expected< EPCGenericDylibManagerCreate (JITDylib &JD)
 Create an EPCGenericDylibManager for the ORC runtime's NativeDylibManager interface, resolving its symbols in the given JITDylib.
static Expected< EPCGenericDylibManagerCreate (ExecutionSession &ES)
 Create an EPCGenericDylibManager for the ORC runtime's NativeDylibManager interface, resolving its symbols in the given ExecutionSession's bootstrap JITDylib.

Detailed Description

Definition at line 35 of file EPCGenericDylibManager.h.

Member Typedef Documentation

◆ OpenProxy

Initial value:
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Represents an address in the executor process.

Proxy for the executor-side dylib-open function.

Given the manager instance address, a path and mode flags it returns a handle to the opened dylib.

Definition at line 40 of file EPCGenericDylibManager.h.

◆ ResolveProxy

Initial value:
A set of symbols to look up, each associated with a SymbolLookupFlags value.

Proxy for the executor-side symbol-resolution function.

Given the manager instance address, a dylib handle and a lookup set it returns the resolved addresses.

Definition at line 46 of file EPCGenericDylibManager.h.

◆ SymbolLookupCompleteFn

Initial value:
Tagged union holding either a T or a Error.
Definition Error.h:485
unique_function is a type-erasing functor similar to std::function.

Definition at line 87 of file EPCGenericDylibManager.h.

Constructor & Destructor Documentation

◆ EPCGenericDylibManager()

llvm::orc::EPCGenericDylibManager::EPCGenericDylibManager ( ExecutionSession & ES,
Bindings B )
inline

Create an EPCGenericDylibManager instance from a given set of dylib-manager bindings.

Definition at line 72 of file EPCGenericDylibManager.h.

References llvm::move().

Referenced by Create().

Member Function Documentation

◆ Create() [1/2]

Expected< EPCGenericDylibManager > llvm::orc::EPCGenericDylibManager::Create ( ExecutionSession & ES)
static

Create an EPCGenericDylibManager for the ORC runtime's NativeDylibManager interface, resolving its symbols in the given ExecutionSession's bootstrap JITDylib.

Definition at line 78 of file EPCGenericDylibManager.cpp.

References Create().

◆ Create() [2/2]

◆ loadDylib()

Expected< tpctypes::DylibHandle > llvm::orc::EPCGenericDylibManager::loadDylib ( const char * DylibPath)
overridevirtual

Load the dynamic library at the given path and return a handle to it.

If DylibPath is null this function will return the global handle for the target process.

Implements llvm::orc::DylibManager.

Definition at line 94 of file EPCGenericDylibManager.cpp.

References open().

◆ lookup()

Expected< tpctypes::LookupResult > llvm::orc::EPCGenericDylibManager::lookup ( tpctypes::DylibHandle H,
const SymbolLookupSet & Lookup )
inline

Looks up symbols within the given dylib.

Definition at line 79 of file EPCGenericDylibManager.h.

References H, Lookup(), and lookupAsync().

◆ lookupAsync()

void llvm::orc::EPCGenericDylibManager::lookupAsync ( tpctypes::DylibHandle H,
const SymbolLookupSet & Lookup,
SymbolLookupCompleteFn Complete )

Looks up symbols within the given dylib.

Definition at line 87 of file EPCGenericDylibManager.cpp.

References H, and Lookup().

Referenced by lookup(), and lookupSymbolsAsync().

◆ lookupSymbolsAsync()

void llvm::orc::EPCGenericDylibManager::lookupSymbolsAsync ( tpctypes::DylibHandle H,
const SymbolLookupSet & Symbols,
DylibManager::SymbolLookupCompleteFn Complete )
overridevirtual

Search for symbols in the target process.

Implements llvm::orc::DylibManager.

Definition at line 98 of file EPCGenericDylibManager.cpp.

References H, and lookupAsync().

◆ open()

Expected< tpctypes::DylibHandle > llvm::orc::EPCGenericDylibManager::open ( StringRef Path,
uint64_t Mode )

Loads the dylib with the given name.

Definition at line 82 of file EPCGenericDylibManager.cpp.

References Mode.

Referenced by loadDylib().


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