From: Lang Hames Date: Fri, 11 Nov 2016 21:55:25 +0000 (+0000) Subject: [Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2322de66feacf6e359be2e87894b7cabed93ee81;p=llvm [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 --- 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; }