[llvm] r266768 - [Orc] Add move ops to RPC to satisfy MSVC.

Kaylor, Andrew via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 12:32:41 PDT 2016


Hi Lang,

I'm still seeing failures trying to build this with MSVC 2013.  The error looks like this:

1>------ Build started: Project: lli, Configuration: Debug x64 ------
1>  lli.cpp
1>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xmemory0(577): error C2280: 'llvm::orc::remote::RPC<llvm::orc::remote::RPCChannel,uint32_t,uint16_t>::RPC(const llvm::orc::remote::RPC<llvm::orc::remote::RPCChannel,uint32_t,uint16_t> &)' : attempting to reference a deleted function
1>          f:\users\akaylor\clang\llvm\include\llvm\executionengine\orc\RPCUtils.h(336) : see declaration of 'llvm::orc::remote::RPC<llvm::orc::remote::RPCChannel,uint32_t,uint16_t>::RPC'
1>          This diagnostic occurred in the compiler generated function 'llvm::orc::remote::OrcRemoteTargetRPCAPI::OrcRemoteTargetRPCAPI(const llvm::orc::remote::OrcRemoteTargetRPCAPI &)'

-Andy

-----Original Message-----
From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf Of Lang Hames via llvm-commits
Sent: Tuesday, April 19, 2016 10:27 AM
To: llvm-commits at lists.llvm.org
Subject: [llvm] r266768 - [Orc] Add move ops to RPC to satisfy MSVC.

Author: lhames
Date: Tue Apr 19 12:26:59 2016
New Revision: 266768

URL: http://llvm.org/viewvc/llvm-project?rev=266768&view=rev
Log:
[Orc] Add move ops to RPC to satisfy MSVC.


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=266768&r1=266767&r2=266768&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/RPCUtils.h Tue Apr 19 
+++ 12:26:59 2016
@@ -328,6 +328,29 @@ template <typename ChannelT, typename Fu
           typename SequenceNumberT = uint16_t>  class RPC : public RPCBase {
 public:
+
+  /// RPC default constructor.
+  RPC() = default;
+
+  /// RPC instances cannot be copied.
+  RPC(const RPC&) = delete;
+
+  /// RPC instances cannot be copied.
+  RPC& operator=(const RPC&) = delete;
+
+  /// RPC move constructor.
+  // FIXME: Remove once MSVC can synthesize move ops.
+  RPC(RPC &&Other)
+    : SequenceNumberMgr(std::move(Other.SequenceNumberMgr)),
+      OutstandingResults(std::move(Other.OutstandingResults)) {}
+
+  /// RPC move assignment.
+  // FIXME: Remove once MSVC can synthesize move ops.
+  RPC& operator=(RPC &&Other) {
+    SequenceNumberMgr = std::move(Other.SequenceNumberMgr);
+    OutstandingResults = std::move(Other.OutstandingResults);
+  }
+
   /// Utility class for defining/referring to RPC procedures.
   ///
   /// Typedefs of this utility are used when calling/handling remote procedures.


_______________________________________________
llvm-commits mailing list
llvm-commits at lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list