llvm.org GIT mirror llvm / 2322de6
[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 Lang Hames 2 years ago
1 changed file(s) with 3 addition(s) and 13 deletion(s). Raw diff Collapse all Expand all
101101
102102 MyServerT Server(TCPChannel, SymbolLookup, RegisterEHFrames, DeregisterEHFrames);
103103
104 while (1) {
105 MyServerT::JITFuncId Id = MyServerT::InvalidId;
106 ExitOnErr(Server.startReceivingFunction(TCPChannel, (uint32_t&)Id));
107 switch (Id) {
108 case MyServerT::TerminateSessionId:
109 ExitOnErr(Server.handleTerminateSession());
110 return 0;
111 default:
112 ExitOnErr(Server.handleKnownFunction(Id));
113 break;
114 }
115 }
104 while (!Server.receivedTerminate())
105 ExitOnErr(Server.handleOne());
116106
117 llvm_unreachable("Fell through server command loop.");
107 return 0;
118108 }