[llvm] r286732 - [ORC] Remove the 'const' qualifier from the member function wrapper, make the

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 12 15:12:41 PST 2016


Author: lhames
Date: Sat Nov 12 17:12:41 2016
New Revision: 286732

URL: http://llvm.org/viewvc/llvm-project?rev=286732&view=rev
Log:
[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.

Modified:
    llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h

Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h?rev=286732&r1=286731&r2=286732&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Sat Nov 12 17:12:41 2016
@@ -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 <typename Func, typename HandlerT>
   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<typename detail::HandlerTraits<HandlerT>::ArgStorage>();




More information about the llvm-commits mailing list