summaryrefslogtreecommitdiffstats
path: root/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2016-11-11 21:55:25 +0000
committerLang Hames <lhames@gmail.com>2016-11-11 21:55:25 +0000
commitd8ec15184ec982fbdd03ad297296d707c345070d (patch)
tree4cc42785e0da325d5cf54364456a24777830de91 /llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server
parent59e635a5cbbb5c4e066d748957c838898331111d (diff)
downloadbcm5719-llvm-d8ec15184ec982fbdd03ad297296d707c345070d.tar.gz
bcm5719-llvm-d8ec15184ec982fbdd03ad297296d707c345070d.zip
[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
llvm-svn: 286642
Diffstat (limited to 'llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server')
-rw-r--r--llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp b/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp
index c53e22fe83a..da6e8ac6523 100644
--- a/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud