#ifndef LLVM_EXECUTIONENGINE_ORC_SHARED_WRAPPERFUNCTIONUTILS_H
#define LLVM_EXECUTIONENGINE_ORC_SHARED_WRAPPERFUNCTIONUTILS_H
#include "llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h"
#include "llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h"
#include "llvm/Support/Error.h"
#include <type_traits>
namespace llvm {
namespace orc {
namespace shared {
CWrapperFunctionResultDataUnion;
CWrapperFunctionResult;
class WrapperFunctionResult { … };
namespace detail {
template <typename SPSArgListT, typename... ArgTs>
WrapperFunctionResult
serializeViaSPSToWrapperFunctionResult(const ArgTs &...Args) { … }
template <typename RetT> class WrapperFunctionHandlerCaller { … };
template <> class WrapperFunctionHandlerCaller<void> { … };
template <typename WrapperFunctionImplT,
template <typename> class ResultSerializer, typename... SPSTagTs>
class WrapperFunctionHandlerHelper
: public WrapperFunctionHandlerHelper<
decltype(&std::remove_reference_t<WrapperFunctionImplT>::operator()),
ResultSerializer, SPSTagTs...> { … };
WrapperFunctionHandlerHelper<RetT (ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (ClassT::*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionHandlerHelper<RetT (ClassT::*)(ArgTs...) const, ResultSerializer, SPSTagTs...>;
template <typename WrapperFunctionImplT,
template <typename> class ResultSerializer, typename... SPSTagTs>
class WrapperFunctionAsyncHandlerHelper
: public WrapperFunctionAsyncHandlerHelper<
decltype(&std::remove_reference_t<WrapperFunctionImplT>::operator()),
ResultSerializer, SPSTagTs...> { … };
WrapperFunctionAsyncHandlerHelper<RetT (SendResultT, ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionAsyncHandlerHelper<RetT (*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionAsyncHandlerHelper<RetT (ClassT::*)(ArgTs...), ResultSerializer, SPSTagTs...>;
WrapperFunctionAsyncHandlerHelper<RetT (ClassT::*)(ArgTs...) const, ResultSerializer, SPSTagTs...>;
template <typename SPSRetTagT, typename RetT> class ResultSerializer { … };
ResultSerializer<SPSRetTagT, Error>;
ResultSerializer<SPSRetTagT, ErrorSuccess>;
ResultSerializer<SPSRetTagT, Expected<T>>;
template <typename SPSRetTagT, typename RetT> class ResultDeserializer { … };
template <> class ResultDeserializer<SPSError, Error> { … };
ResultDeserializer<SPSExpected<SPSTagT>, Expected<T>>;
template <typename SPSRetTagT, typename RetT> class AsyncCallResultHelper { … };
}
template <typename SPSSignature> class WrapperFunction;
WrapperFunction<SPSRetTagT (SPSTagTs...)>;
WrapperFunction<void (SPSTagTs...)>;
template <typename RetT, typename ClassT, typename... ArgTs>
class MethodWrapperHandler { … };
template <typename RetT, typename ClassT, typename... ArgTs>
MethodWrapperHandler<RetT, ClassT, ArgTs...>
makeMethodWrapperHandler(RetT (ClassT::*Method)(ArgTs...)) { … }
class WrapperFunctionCall { … };
SPSWrapperFunctionCall;
template <>
class SPSSerializationTraits<SPSWrapperFunctionCall, WrapperFunctionCall> { … };
}
}
}
#endif