X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Fllvm%2FExecutionEngine%2FOrc%2FOrcRemoteTargetClient.h;h=3f1f74d65faecd2e32447090d40cb43e0578e2ef;hb=d357cbfd502448626ab1a445ca2ea3852eab6bd6;hp=8512fd2e1250f968cfa84fe1eb3bbac9578a7982;hpb=51c60258a4ad2ad2181734448eeb6dea16d53e0b;p=oota-llvm.git diff --git a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h index 8512fd2e125..3f1f74d65fa 100644 --- a/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h +++ b/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h @@ -16,7 +16,9 @@ #ifndef LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H #define LLVM_EXECUTIONENGINE_ORC_ORCREMOTETARGETCLIENT_H +#include "IndirectionUtils.h" #include "OrcRemoteTargetRPCAPI.h" +#include #define DEBUG_TYPE "orc-remote" @@ -90,8 +92,9 @@ public: 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."); } @@ -250,6 +253,19 @@ public: : 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; }