From f83ef1736ff0c4ac8450c628f812b9b71e35eb18 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sun, 8 Jan 2017 00:18:51 +0000 Subject: [PATCH] [Orc][RPC] Add a class-method version of addHandler to MultiThreadedRPCEndpoint. This brings MultiThreadedRPCEndpoint's addHandler API in-line with SingleThreadedRPCEndpoint's. This will be tested in an up-coming unit-test for MultiThreadedRPCEndpoint. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@291376 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/Orc/RPCUtils.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/include/llvm/ExecutionEngine/Orc/RPCUtils.h index 6e4205c9d4a..f90a69a0877 100644 --- a/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/include/llvm/ExecutionEngine/Orc/RPCUtils.h @@ -1062,6 +1062,15 @@ public: std::move(Launch)); } + /// Add a class-method as a handler. + template + void addHandler(ClassT &Object, RetT (ClassT::*Method)(ArgTs...), + LaunchPolicy Launch = LaunchPolicy()) { + addHandler( + detail::MemberFnWrapper(Object, Method), + Launch); + } + /// Negotiate a function id for Func with the other end of the channel. template Error negotiateFunction() { using OrcRPCNegotiate = typename BaseClass::OrcRPCNegotiate; -- 2.50.1