From: Lang Hames Date: Sat, 12 Nov 2016 23:12:41 +0000 (+0000) Subject: [ORC] Remove the 'const' qualifier from the member function wrapper, make the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a1e4ad0015ebc761eb17d31961cc515a2ba08bfe;p=llvm [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 --- 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>();