[Orc] Include <system_error> in OrcTargetClient.
[oota-llvm.git] / include / llvm / ExecutionEngine / Orc / OrcRemoteTargetClient.h
index fb15c8f3424f228c18302e9a116e6779095ebc1f..3f1f74d65faecd2e32447090d40cb43e0578e2ef 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "IndirectionUtils.h"
 #include "OrcRemoteTargetRPCAPI.h"
 
 #include "IndirectionUtils.h"
 #include "OrcRemoteTargetRPCAPI.h"
+#include <system_error>
 
 #define DEBUG_TYPE "orc-remote"
 
 
 #define DEBUG_TYPE "orc-remote"
 
@@ -91,8 +92,9 @@ public:
       DEBUG(dbgs() << "Allocator " << Id << " reserved:\n");
 
       if (CodeSize != 0) {
       DEBUG(dbgs() << "Allocator " << Id << " reserved:\n");
 
       if (CodeSize != 0) {
-        if (auto EC = Client.reserveMem(Unmapped.back().RemoteCodeAddr, Id,
-                                        CodeSize, CodeAlign)) {
+        if (std::error_code EC = Client.reserveMem(
+                Unmapped.back().RemoteCodeAddr, Id, CodeSize, CodeAlign)) {
+          (void)EC;
           // FIXME; Add error to poll.
           llvm_unreachable("Failed reserving remote memory.");
         }
           // FIXME; Add error to poll.
           llvm_unreachable("Failed reserving remote memory.");
         }
@@ -251,6 +253,19 @@ public:
           : Size(Size), Align(Align), Contents(new char[Size + Align - 1]),
             RemoteAddr(0) {}
 
           : Size(Size), Align(Align), Contents(new char[Size + Align - 1]),
             RemoteAddr(0) {}
 
+      Alloc(Alloc &&Other)
+          : Size(std::move(Other.Size)), Align(std::move(Other.Align)),
+            Contents(std::move(Other.Contents)),
+            RemoteAddr(std::move(Other.RemoteAddr)) {}
+
+      Alloc &operator=(Alloc &&Other) {
+        Size = std::move(Other.Size);
+        Align = std::move(Other.Align);
+        Contents = std::move(Other.Contents);
+        RemoteAddr = std::move(Other.RemoteAddr);
+        return *this;
+      }
+
       uint64_t getSize() const { return Size; }
 
       unsigned getAlign() const { return Align; }
       uint64_t getSize() const { return Size; }
 
       unsigned getAlign() const { return Align; }