13#ifndef LLVM_EXECUTIONENGINE_ORC_CALLSPSVIAEPC_H
14#define LLVM_EXECUTIONENGINE_ORC_CALLSPSVIAEPC_H
23template <
typename SPSRetT,
typename... SPSArgTs>
28 template <
typename... ArgTs>
31 ArgSerialization::size(Args...));
33 if (!ArgSerialization::serialize(OB, Args...))
36 return std::move(Buffer);
40template <
typename SPSSig>
47template <
typename SPSSig>
50 template <
typename RetT>
52 using RetDeserialization =
56 if (!RetDeserialization::deserialize(IB, ReturnValue))
64template <
typename... SPSArgTs>
67 template <
typename RetT>
68 std::enable_if_t<std::is_void_v<RetT>,
Error>
70 if (!ResultBytes.
empty())
77template <
typename SPSSig>
85template <
typename SPSSig>
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.
EPCCall(ExecutorProcessControl &EPC, SPSCallSerializer< SPSSig > &&S, ExecutorSymbolDef Fn)
EPCCaller(ExecutorProcessControl &EPC, SPSCallSerializer< SPSSig > &&S)
ExecutorProcessControl supports interaction with a JIT target process.
Represents a defining location for a JIT symbol.
SPSEPCCall(ExecutorProcessControl &EPC, ExecutorSymbolDef Fn)
SPSEPCCaller(ExecutorProcessControl &EPC)
A utility class for serializing to a blob from a variadic list.
Output char buffer with overflow check.
C++ wrapper function result: Same as CWrapperFunctionResult but auto-releases memory.
static WrapperFunctionResult allocate(size_t Size)
Create a WrapperFunctionResult with the given size and return a pointer to the underlying memory.
bool empty() const
Returns true if this value is equivalent to a default-constructed WrapperFunctionResult.
size_t size() const
Returns the size of the data contained in this instance.
char * data()
Get a pointer to the data contained in this instance.
LLVM_ABI std::error_code inconvertibleErrorCode()
The value returned by this function can be returned from convertToErrorCode for Error values where no...
Error make_error(ArgTs &&... Args)
Make a Error instance representing failure using the given error info type.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
CallableTraitsHelper takes an implementation class template Impl and some callable type C and passes ...
std::enable_if_t< std::is_void_v< RetT >, Error > deserialize(shared::WrapperFunctionResult ResultBytes)
SPS serialization for non-void calls.
Expected< RetT > deserialize(shared::WrapperFunctionResult ResultBytes)
shared::SPSArgList< SPSArgTs... > ArgSerialization
Expected< shared::WrapperFunctionResult > serialize(ArgTs &&...Args)
shared::SPSArgList< SPSRetT > RetSerialization