summaryrefslogtreecommitdiffstats
path: root/clang/lib/Tooling/AllTUsExecution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Tooling/AllTUsExecution.cpp')
-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