[llvm] r266768 - [Orc] Add move ops to RPC to satisfy MSVC.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 19 10:27:00 PDT 2016
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.
More information about the llvm-commits
mailing list