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-Tag: llvmorg-4.0.0-rc1~4766 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79c6f7a0c57650cc7006e28065db670d9d7f2704;p=platform%2Fupstream%2Fllvm.git [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. llvm-svn: 286732 --- diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h index e306517..f616057 100644 --- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h +++ b/llvm/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>();