summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-09-12 08:29:47 +0000
committerEric Liu <ioeric@google.com>2018-09-12 08:29:47 +0000
commit6857692687979d934e188d117eadc93f48d52a0c (patch)
tree7c16f248d7e07bd3a77927e5f678f4ee763cb1b5
parent1086ce2397e0c954855ae96edbd864934a09a92b (diff)
downloadbcm5719-llvm-6857692687979d934e188d117eadc93f48d52a0c.tar.gz
bcm5719-llvm-6857692687979d934e188d117eadc93f48d52a0c.zip
[Tooling] Wait for all threads to finish before resetting CWD.
llvm-svn: 342028
-rw-r--r--clang/lib/Tooling/AllTUsExecution.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Tooling/AllTUsExecution.cpp b/clang/lib/Tooling/AllTUsExecution.cpp
index a7af541cc5d..0f56bbf13f7 100644
--- a/clang/lib/Tooling/AllTUsExecution.cpp
+++ b/clang/lib/Tooling/AllTUsExecution.cpp
@@ -129,6 +129,8 @@ llvm::Error AllTUsToolExecutor::execute(
},
File);
}
+ // Make sure all tasks have finished before resetting the working directory.
+ Pool.wait();
if (!InitialWorkingDir.empty()) {
if (auto EC = llvm::sys::fs::set_current_path(InitialWorkingDir))
llvm::errs() << "Error while restoring working directory: "
OpenPOWER on IntegriCloud