20#ifndef LLVM_EXECUTIONENGINE_ORC_SPSPROXYSPEC_H
21#define LLVM_EXECUTIONENGINE_ORC_SPSPROXYSPEC_H
29template <
typename ProxyT,
typename CI,
30 typename FnType =
typename ProxyT::FnType>
33template <
typename ProxyT,
typename CI,
typename RetT,
typename... ArgTs>
36 using SPSSigT =
typename CI::SPSSig;
37 using CalleeRetT =
typename ProxyT::CalleeRetT;
38 using ErrorRetT =
typename ProxyT::ErrorRetT;
42 template <
typename T>
static void consumeResult(
T &V) {}
44 template <
typename T>
static void consumeResult(
Expected<T> &
E) {
53 const ArgTs &...Args) {
54 auto Caller = [&ES, CalleeAddr](
auto &&SendResult,
const char *ArgData,
57 std::forward<
decltype(SendResult)>(SendResult),
61 if constexpr (std::is_void_v<CalleeRetT>) {
69 [OnComplete = std::move(OnComplete)](
Error SerErr,
70 CalleeRetT
Result)
mutable {
73 return OnComplete(std::move(SerErr));
77 return OnComplete(std::move(
Result));
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Lightweight error class with error context and mandatory checking.
Tagged union holding either a T or a Error.
An ExecutionSession represents a running JIT program.
void callWrapperAsync(ExecutorAddr WrapperFnAddr, ExecutorProcessControl::IncomingWFRHandler OnComplete, ArrayRef< char > ArgBuffer)
Run a wrapper function in the executor.
Represents an address in the executor process.
A symbol name together with the naming level (SymbolNameKind) it is expressed in, so that a Mangler /...
static void dispatch(unique_function< void(ErrorRetT)> OnComplete, ExecutionSession &ES, ExecutorAddr CalleeAddr, const ArgTs &...Args)
static constexpr SymbolNameSpec Name
unique_function is a type-erasing functor similar to std::function.
void consumeError(Error Err)
Consume a Error without doing anything.