r342028 - [Tooling] Wait for all threads to finish before resetting CWD.
Eric Liu via cfe-commits
cfe-commits at lists.llvm.org
Wed Sep 12 01:29:47 PDT 2018
Author: ioeric
Date: Wed Sep 12 01:29:47 2018
New Revision: 342028
URL: http://llvm.org/viewvc/llvm-project?rev=342028&view=rev
Log:
[Tooling] Wait for all threads to finish before resetting CWD.
Modified:
cfe/trunk/lib/Tooling/AllTUsExecution.cpp
Modified: cfe/trunk/lib/Tooling/AllTUsExecution.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/AllTUsExecution.cpp?rev=342028&r1=342027&r2=342028&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/AllTUsExecution.cpp (original)
+++ cfe/trunk/lib/Tooling/AllTUsExecution.cpp Wed Sep 12 01:29:47 2018
@@ -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: "
More information about the cfe-commits
mailing list