25 std::vector<LookupApplyFn> Applies;
26 Applies.reserve(PrepareFns.
size());
27 for (
const auto &PF : PrepareFns)
28 Applies.push_back(PF(Symbols, ES));
34 Symbols.mergeEntries();
38 [Applies = std::move(Applies),
41 return OnApplied(
Result.takeError());
42 for (
auto &Apply : Applies)
52 std::promise<MSVCPError> ResultP;
53 auto ResultF = ResultP.get_future();
55 SearchOrder, PrepareFns);
Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
Get the array size.
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.
LLVM_ABI void lookup(LookupKind K, const JITDylibSearchOrder &SearchOrder, SymbolLookupSet Symbols, SymbolState RequiredState, SymbolsResolvedCallback NotifyComplete, RegisterDependenciesFunction RegisterDependencies)
Search the given JITDylibs for the given symbols.
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.
unique_function is a type-erasing functor similar to std::function.
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< std::pair< JITDylib *, JITDylibLookupFlags > > JITDylibSearchOrder
A list of (JITDylib*, JITDylibLookupFlags) pairs to be used as a search order during symbol lookup.
LLVM_ABI void lookupAndApply(unique_function< void(Error)> OnApplied, ExecutionSession &ES, LookupKind K, const JITDylibSearchOrder &SearchOrder, ArrayRef< LookupPrepareFn > PrepareFns)
Resolve the symbols contributed by every prepare function with a single lookup, then let each of thei...
LookupKind
Describes the kind of lookup being performed.
LLVM_ABI 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.