49 if (
auto Err = EPC.getBootstrapSymbols(
50 {{SAs.Instance, rt::SimpleExecutorDylibManagerInstanceName},
51 {SAs.Open, rt::SimpleExecutorDylibManagerOpenWrapperName},
52 {SAs.Resolve, rt::SimpleExecutorDylibManagerResolveWrapperName}}))
53 return std::move(Err);
66 {ES.intern(SNs.
OpenName), &SAs.Open},
69 return std::move(Err);
84 SAs.Open,
H, SAs.Instance, Path,
Mode))
85 return std::move(Err);
94 [Complete = std::move(Complete)](
95 Error SerializationErr,
97 if (SerializationErr) {
99 Complete(std::move(SerializationErr));
102 Complete(std::move(
Result));
112 [Complete = std::move(Complete)](
113 Error SerializationErr,
115 if (SerializationErr) {
117 Complete(std::move(SerializationErr));
120 Complete(std::move(
Result));
127 return open(DylibPath, 0);
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
static int Lookup(ArrayRef< TableEntry > Table, unsigned Opcode)
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
Represent a constant reference to a string, i.e.
unique_function< void(Expected< tpctypes::LookupResult >)> SymbolLookupCompleteFn
LLVM_ABI Expected< tpctypes::DylibHandle > loadDylib(const char *DylibPath) override
Load the dynamic library at the given path and return a handle to it.
LLVM_ABI void lookupSymbolsAsync(tpctypes::DylibHandle H, const SymbolLookupSet &Symbols, DylibManager::SymbolLookupCompleteFn Complete) override
Search for symbols in the target process.
static LLVM_ABI Expected< EPCGenericDylibManager > CreateWithDefaultBootstrapSymbols(ExecutorProcessControl &EPC)
Create an EPCGenericDylibManager instance by looking up the LLVM-style SimpleExecutorDylibManager sym...
LLVM_ABI void lookupAsync(tpctypes::DylibHandle H, const SymbolLookupSet &Lookup, SymbolLookupCompleteFn Complete)
Looks up symbols within the given dylib.
static LLVM_ABI Expected< EPCGenericDylibManager > Create(JITDylib &JD, rt::SimpleExecutorDylibManagerSymbolNames SNs=rt::orc_rt_NativeDylibManagerSPSSymbols)
Create an EPCGenericDylibManager using the given implementation symbol names.
LLVM_ABI Expected< tpctypes::DylibHandle > open(StringRef Path, uint64_t Mode)
Loads the dylib with the given name.
EPCGenericDylibManager(ExecutorProcessControl &EPC, SymbolAddrs SAs)
Create an EPCGenericDylibManager instance from a given set of function addrs.
unique_function< void(Expected< tpctypes::LookupResult >)> SymbolLookupCompleteFn
An ExecutionSession represents a running JIT program.
JITDylib & getBootstrapJITDylib()
Returns a reference to the bootstrap JITDylib.
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
Represents a JIT'd dynamic library.
ExecutionSession & getExecutionSession() const
Get a reference to the ExecutionSession for this JITDylib.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
std::pair< SymbolStringPtr, SymbolLookupFlags > value_type
A utility class for serializing to a blob from a variadic list.
Output char buffer with overflow check.
static bool serialize(SPSOutputBuffer &OB, const SymbolLookupSet::value_type &V)
static size_t size(const SymbolLookupSet::value_type &V)
Specialize to describe how to serialize/deserialize to/from the given concrete type.
static constexpr bool available
Specialize this to implement 'trivial' sequence serialization for a concrete sequence type.
shared::SPSExpected< shared::SPSSequence< shared::SPSOptional< shared::SPSExecutorAddr > > >( shared::SPSExecutorAddr, shared::SPSExecutorAddr, shared::SPSRemoteSymbolLookupSet) SPSSimpleExecutorDylibManagerResolveSignature
shared::SPSExpected< shared::SPSExecutorAddr >(shared::SPSExecutorAddr, shared::SPSString, uint64_t) SPSSimpleExecutorDylibManagerOpenSignature
SPSTuple< SPSString, bool > SPSRemoteSymbolLookupSetElement
ExecutorAddr DylibHandle
A handle used to represent a loaded dylib in the target process.
JITDylibSearchOrder makeJITDylibSearchOrder(ArrayRef< JITDylib * > JDs, JITDylibLookupFlags Flags=JITDylibLookupFlags::MatchExportedSymbolsOnly)
Convenience function for creating a search order from an ArrayRef of JITDylib*, all with the same fla...
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
LLVM_ABI void lookupAndRecordAddrs(unique_function< void(Error)> OnRecorded, ExecutionSession &ES, LookupKind K, const JITDylibSearchOrder &SearchOrder, std::vector< std::pair< SymbolStringPtr, ExecutorAddr * > > Pairs, SymbolLookupFlags LookupFlags=SymbolLookupFlags::RequiredSymbol)
Record addresses of the given symbols in the given ExecutorAddrs.
This is an optimization pass for GlobalISel generic memory operations.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
Function addresses for memory access.
Symbol names for dylib management implementation.