[llvm] r257372 - [Orc] Add explicit move construction/assignment to RCMemoryManager.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 11:39:49 PST 2016
Author: lhames
Date: Mon Jan 11 13:39:49 2016
New Revision: 257372
URL: http://llvm.org/viewvc/llvm-project?rev=257372&view=rev
Log:
[Orc] Add explicit move construction/assignment to RCMemoryManager.
Yet another attempt to pacify MSVC.
Modified:
llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
Modified: llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h?rev=257372&r1=257371&r2=257372&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h Mon Jan 11 13:39:49 2016
@@ -44,6 +44,19 @@ public:
DEBUG(dbgs() << "Created remote allocator " << Id << "\n");
}
+ RCMemoryManager(RCMemoryManager &&Other)
+ : Client(std::move(Other.Client)), Id(std::move(Other.Id)),
+ Unmapped(std::move(Other.Unmapped)),
+ Unfinalized(std::move(Other.Unfinalized)) {}
+
+ RCMemoryManager operator=(RCMemoryManager &&Other) {
+ Client = std::move(Other.Client);
+ Id = std::move(Other.Id);
+ Unmapped = std::move(Other.Unmapped);
+ Unfinalized = std::move(Other.Unfinalized);
+ return *this;
+ }
+
~RCMemoryManager() {
Client.destroyRemoteAllocator(Id);
DEBUG(dbgs() << "Destroyed remote allocator " << Id << "\n");
@@ -253,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)),
More information about the llvm-commits
mailing list