summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-04-19 17:26:59 +0000
committerLang Hames <lhames@gmail.com>2016-04-19 17:26:59 +0000
commit18609f5743889a2ac89774f317f82d86030e0ef8 (patch)
tree51e9847c2cbda09252dfd71c83a6eab0d2ab0572
parentb7dfbb40a3fd9491c0188eca0ed2af66fa5ef44f (diff)
downloadbcm5719-llvm-18609f5743889a2ac89774f317f82d86030e0ef8.tar.gz
bcm5719-llvm-18609f5743889a2ac89774f317f82d86030e0ef8.zip
[Orc] Add move ops to RPC to satisfy MSVC.
llvm-svn: 266768
-rw-r--r--llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
index 2bd198e7819..3110d81473d 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h
@@ -328,6 +328,29 @@ template <typename ChannelT, typename FunctionIdT = uint32_t,
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.
OpenPOWER on IntegriCloud