From 169ee125af6726b4f2b89434b4bef17f8202741e Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Mon, 11 Jan 2016 20:52:33 +0000 Subject: [PATCH] [ORC] Add explicit move construction/assignment to OrcRemoteTargetClient::ObjectAllocs. More MSVC bot appeasement. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257382 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Orc/OrcRemoteTargetClient.h | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h index ebf581c81fc..21e8f483392 100644 --- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h +++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h @@ -266,9 +266,6 @@ public: : Size(Size), Align(Align), Contents(new char[Size + Align - 1]), RemoteAddr(0) {} - Alloc(const Alloc&) = delete; - Alloc& operator=(const Alloc&) = delete; - Alloc(Alloc &&Other) : Size(std::move(Other.Size)), Align(std::move(Other.Align)), Contents(std::move(Other.Contents)), @@ -308,6 +305,25 @@ public: struct ObjectAllocs { ObjectAllocs() : RemoteCodeAddr(0), RemoteRODataAddr(0), RemoteRWDataAddr(0) {} + + ObjectAllocs(ObjectAllocs &&Other) + : RemoteCodeAddr(std::move(Other.RemoteCodeAddr)), + RemoteRODataAddr(std::move(Other.RemoteRODataAddr)), + RemoteRWDataAddr(std::move(Other.RemoteRWDataAddr)), + CodeAllocs(std::move(Other.CodeAllocs)), + RODataAllocs(std::move(Other.RODataAllocs)), + RWDataAllocs(std::move(Other.RWDataAllocs)) {} + + ObjectAllocs &operator=(ObjectAllocs &&Other) { + RemoteCodeAddr = std::move(Other.RemoteCodeAddr); + RemoteRODataAddr = std::move(Other.RemoteRODataAddr); + RemoteRWDataAddr = std::move(Other.RemoteRWDataAddr); + CodeAllocs = std::move(Other.CodeAllocs); + RODataAllocs = std::move(Other.RODataAllocs); + RWDataAllocs = std::move(Other.RWDataAllocs); + return *this; + } + TargetAddress RemoteCodeAddr; TargetAddress RemoteRODataAddr; TargetAddress RemoteRWDataAddr; -- 2.34.1