19 std::vector<std::pair<SymbolStringPtr, ExecutorAddr *>> Pairs,
23 for (
auto &KV : Pairs)
24 Symbols.add(KV.first, LookupFlags);
28 [Pairs = std::move(Pairs),
31 return OnRec(
Result.takeError());
32 for (
auto &KV : Pairs) {
33 auto I =
Result->find(KV.first);
44 std::vector<std::pair<SymbolStringPtr, ExecutorAddr *>> Pairs,
47 std::promise<MSVCPError> ResultP;
48 auto ResultF = ResultP.get_future();
50 ES, K, SearchOrder, std::move(Pairs), LookupFlags);
56 std::vector<std::pair<SymbolStringPtr, ExecutorAddr *>> Pairs,
60 for (
auto &KV : Pairs)
61 Symbols.add(KV.first, LookupFlags);
69 return make_error<StringError>(
"Error in lookup result",
71 if (
Result->front().size() != Pairs.size())
72 return make_error<StringError>(
"Error in lookup result elements",
75 for (
unsigned I = 0;
I != Pairs.size(); ++
I)
76 *Pairs[
I].second =
Result->front()[
I].getAddress();
for(const MachineOperand &MO :llvm::drop_begin(OldMI.operands(), Desc.getNumOperands()))
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
An ExecutionSession represents a running JIT program.
void lookup(LookupKind K, const JITDylibSearchOrder &SearchOrder, SymbolLookupSet Symbols, SymbolState RequiredState, SymbolsResolvedCallback NotifyComplete, RegisterDependenciesFunction RegisterDependencies)
Search the given JITDylibs for the given symbols.
Represents an address in the executor process.
ExecutorProcessControl supports interaction with a JIT target process.
Expected< std::vector< tpctypes::LookupResult > > lookupSymbols(ArrayRef< LookupRequest > Request)
Search for symbols in the target process.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
unique_function is a type-erasing functor similar to std::function.
std::vector< std::pair< JITDylib *, JITDylibLookupFlags > > JITDylibSearchOrder
A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup.
SymbolLookupFlags
Lookup flags that apply to each symbol in a lookup.
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.
LookupKind
Describes the kind of lookup being performed.
RegisterDependenciesFunction NoDependenciesToRegister
This can be used as the value for a RegisterDependenciesFunction if there are no dependants to regist...
@ Ready
Emitted to memory, but waiting on transitive dependencies.
This is an optimization pass for GlobalISel generic memory operations.
std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
A pair of a dylib and a set of symbols to be looked up.