17#ifndef LLVM_EXECUTIONENGINE_ORC_RECORDPROXY_H
18#define LLVM_EXECUTIONENGINE_ORC_RECORDPROXY_H
30template <
typename FnT>
37 auto N = Mangle.withMangledNameDo([&](
StringRef M) {
return ES.intern(M); },
41 auto Sym = M.lookup(
N);
52template <
typename FnT>
57 return [
P,
Dispatch, Name = std::move(Name),
62 auto Sym = M.lookup(Name);
71template <
typename ProxySpecT,
typename FnT>
75 return recordProxy(
P, ProxySpecT::dispatch, ProxySpecT::Name, LF);
80template <
typename ProxySpecT,
typename FnT>
84 return recordProxy(
P, ProxySpecT::dispatch, std::move(Name), LF);
90template <
typename ProxySpecT,
typename FnT>
94 return recordProxy(
P, ProxySpecT::dispatch, std::move(Name), LF);
Represent a constant reference to a string, i.e.
An ExecutionSession represents a running JIT program.
Applies linker name-mangling for a target.
A set of symbols to look up, each associated with a SymbolLookupFlags value.
A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler /...
Pointer to a pooled string representing a symbol name.
LookupPrepareFn recordProxy(Proxy< FnT > *P, typename Proxy< FnT >::DispatchFn Dispatch, SymbolNameSpec Name, SymbolLookupFlags LF=SymbolLookupFlags::RequiredSymbol)
Builds P over the symbol with the given name, dispatching through Dispatch.
SymbolLookupFlags
Lookup flags that apply to each symbol in a lookup.
DenseMap< SymbolStringPtr, ExecutorSymbolDef > SymbolMap
A map from symbol names (as SymbolStringPtrs) to JITSymbols (address/flags pairs).
unique_function< void(const SymbolMap &M)> LookupApplyFn
Acts on the result of a completed lookup.
unique_function< LookupApplyFn( SymbolLookupSet &LS, ExecutionSession &ES, const Mangler &Mangle) const > LookupPrepareFn
Contributes symbols to a lookup, and returns the function that will act on the result.