[Orc] Handle hangup messages in SimpleRemoteEPC
authorStefan Gränitz <stefan.graenitz@gmail.com>
Mon, 11 Oct 2021 18:37:47 +0000 (20:37 +0200)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Mon, 11 Oct 2021 19:04:56 +0000 (21:04 +0200)
commita6c9506365fb4027f5403e2e39301ad8e0668267
treeb3e549c263e49b281e9cf6738dc2f547b9afc27c
parentec2d0ded1b3fc941119935c66576329b9f43a9f1
[Orc] Handle hangup messages in SimpleRemoteEPC

On the controller-side, handle `Hangup` messages from the executor. The executor passed `Error::success()` or a failure message as payload.

Hangups cause an immediate disconnect of the transport layer. The disconnect function may be called later again and so implementations should be prepared. `FDSimpleRemoteEPCTransport::disconnect()` already has a flag to check that:
https://github.com/llvm/llvm-project/blob/cd1bd95d8707371da0e4f75cd01669c427466931/llvm/lib/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.cpp#L112

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D111527
llvm/include/llvm/ExecutionEngine/Orc/Shared/SimpleRemoteEPCUtils.h
llvm/include/llvm/ExecutionEngine/Orc/SimpleRemoteEPC.h
llvm/lib/ExecutionEngine/Orc/SimpleRemoteEPC.cpp