[llvm] c965fde - [ORC] Shut down services in SimpleRemoteEPCServer.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 16:27:32 PDT 2021
Author: Lang Hames
Date: 2021-09-23T16:27:28-07:00
New Revision: c965fde7c234abbb311ab9f58e8684970a69c916
URL: https://github.com/llvm/llvm-project/commit/c965fde7c234abbb311ab9f58e8684970a69c916
DIFF: https://github.com/llvm/llvm-project/commit/c965fde7c234abbb311ab9f58e8684970a69c916.diff
LOG: [ORC] Shut down services in SimpleRemoteEPCServer.
This should have been included with ExecutorBootstrapService in 78b083dbb72,
but was accidentally left out. It give services a chance to release any
resources that they have acquired.
Added:
Modified:
llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
Removed:
################################################################################
diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
index e49cce5a52ad..aa35263f35cd 100644
--- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp
@@ -113,6 +113,13 @@ void SimpleRemoteEPCServer::handleDisconnect(Error Err) {
// Wait for dispatcher to clear.
D->shutdown();
+ // Shut down services.
+ while (!Services.empty()) {
+ ShutdownErr =
+ joinErrors(std::move(ShutdownErr), Services.back()->shutdown());
+ Services.pop_back();
+ }
+
std::lock_guard<std::mutex> Lock(ServerStateMutex);
ShutdownErr = joinErrors(std::move(ShutdownErr), std::move(Err));
RunState = ServerShutDown;
More information about the llvm-commits
mailing list