forked from OSchip/llvm-project
[Orc] Add explicit move construction/assignment to RCMemoryManager.
Yet another attempt to pacify MSVC. llvm-svn: 257372
This commit is contained in:
parent
ec880422df
commit
3bedcea623
|
@ -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)),
|
||||
|
|
Loading…
Reference in New Issue