From a1e4ad0015ebc761eb17d31961cc515a2ba08bfe Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Sat, 12 Nov 2016 23:12:41 +0000 Subject: [PATCH] [ORC] Remove the 'const' qualifier from the member function wrapper, make the lambda in wrapHandler mutable to allow it to pass the handler through as a non-const value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286732 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/Orc/RPCUtils.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/include/llvm/ExecutionEngine/Orc/RPCUtils.h index e30651712dc..f61605722d2 100644 --- a/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/include/llvm/ExecutionEngine/Orc/RPCUtils.h @@ -554,7 +554,7 @@ public: using MethodT = RetT(ClassT::*)(ArgTs...); MemberFnWrapper(ClassT &Instance, MethodT Method) : Instance(Instance), Method(Method) {} - RetT operator()(ArgTs &&... Args) const { + RetT operator()(ArgTs &&... Args) { return (Instance.*Method)(std::move(Args)...); } private: @@ -856,7 +856,8 @@ protected: template WrappedHandlerFn wrapHandler(HandlerT Handler, LaunchPolicy Launch) { return - [this, Handler, Launch](ChannelT &Channel, SequenceNumberT SeqNo) -> Error { + [this, Handler, Launch](ChannelT &Channel, SequenceNumberT SeqNo) mutable + -> Error { // Start by deserializing the arguments. auto Args = std::make_shared::ArgStorage>(); -- 2.50.1