[llvm] r286642 - [Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 11 13:55:25 PST 2016
Author: lhames
Date: Fri Nov 11 15:55:25 2016
New Revision: 286642
URL: http://llvm.org/viewvc/llvm-project?rev=286642&view=rev
Log:
[Orc] Update the BuildingAJIT Chapter 5 server class for the recent RPC changes.
Modified:
llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp
Modified: llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp?rev=286642&r1=286641&r2=286642&view=diff
==============================================================================
--- llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp (original)
+++ llvm/trunk/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp Fri Nov 11 15:55:25 2016
@@ -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;
}
More information about the llvm-commits
mailing list