diff options
author | Lang Hames <lhames@gmail.com> | 2016-11-11 21:55:25 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2016-11-11 21:55:25 +0000 |
commit | 2322de66feacf6e359be2e87894b7cabed93ee81 (patch) | |
tree | 5dfd9bf1543bb511ebd021c90d7edef7cc4a4f93 /examples | |
parent | cd5b334349a8770045ed3e89b4489adbc8e5f099 (diff) |
[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286642 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp b/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp index c53e22fe83a..da6e8ac6523 100644 --- a/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp +++ b/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp @@ -102,18 +102,8 @@ int main(int argc, char* argv[]) { MyServerT Server(TCPChannel, SymbolLookup, RegisterEHFrames, DeregisterEHFrames); - while (1) { - MyServerT::JITFuncId Id = MyServerT::InvalidId; - ExitOnErr(Server.startReceivingFunction(TCPChannel, (uint32_t&)Id)); - switch (Id) { - case MyServerT::TerminateSessionId: - ExitOnErr(Server.handleTerminateSession()); - return 0; - default: - ExitOnErr(Server.handleKnownFunction(Id)); - break; - } - } + while (!Server.receivedTerminate()) + ExitOnErr(Server.handleOne()); - llvm_unreachable("Fell through server command loop."); + return 0; } |