[PATCH] D78956: [WIP][FileCollector] FileCollector::Mutex
Jan Korous via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 11:18:10 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1e43cab3c672: [FileCollector] Lock Mutex in copyFiles (authored by jkorous).
Changed prior to commit:
https://reviews.llvm.org/D78956?vs=260410&id=260706#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78956/new/
https://reviews.llvm.org/D78956
Files:
llvm/include/llvm/Support/FileCollector.h
llvm/lib/Support/FileCollector.cpp
Index: llvm/lib/Support/FileCollector.cpp
===================================================================
--- llvm/lib/Support/FileCollector.cpp
+++ llvm/lib/Support/FileCollector.cpp
@@ -150,6 +150,8 @@
}
std::error_code FileCollector::copyFiles(bool StopOnError) {
+ std::lock_guard<std::mutex> lock(Mutex);
+
for (auto &entry : VFSWriter.getMappings()) {
// Create directory tree.
if (std::error_code EC =
Index: llvm/include/llvm/Support/FileCollector.h
===================================================================
--- llvm/include/llvm/Support/FileCollector.h
+++ llvm/include/llvm/Support/FileCollector.h
@@ -69,7 +69,7 @@
addDirectoryImpl(const llvm::Twine &Dir,
IntrusiveRefCntPtr<vfs::FileSystem> FS, std::error_code &EC);
- /// Synchronizes adding files.
+ /// Synchronizes access to Seen, VFSWriter and SymlinkMap.
std::mutex Mutex;
/// The root directory where files are copied.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78956.260706.patch
Type: text/x-patch
Size: 955 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200428/dde7e27e/attachment.bin>
More information about the llvm-commits
mailing list