[Lldb-commits] [lldb] ab22f71 - [lldb/Reproducers] Also record directories FileSystem::Collect.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue May 12 15:59:36 PDT 2020
Author: Jonas Devlieghere
Date: 2020-05-12T15:59:24-07:00
New Revision: ab22f71dd75895fbde1cd1a515b2164227d5dfd2
URL: https://github.com/llvm/llvm-project/commit/ab22f71dd75895fbde1cd1a515b2164227d5dfd2
DIFF: https://github.com/llvm/llvm-project/commit/ab22f71dd75895fbde1cd1a515b2164227d5dfd2.diff
LOG: [lldb/Reproducers] Also record directories FileSystem::Collect.
Now that the FileCollector knows how to deal with directories we no
longer have to ignore them in the FileSystem class.
Added:
Modified:
lldb/source/Host/common/FileSystem.cpp
Removed:
################################################################################
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp
index 7e33eeb2a812..0fa27d131e1a 100644
--- a/lldb/source/Host/common/FileSystem.cpp
+++ b/lldb/source/Host/common/FileSystem.cpp
@@ -487,7 +487,11 @@ void FileSystem::Collect(const FileSpec &file_spec) {
}
void FileSystem::Collect(const llvm::Twine &file) {
- if (m_collector && !llvm::sys::fs::is_directory(file)) {
+ if (!m_collector)
+ return;
+
+ if (llvm::sys::fs::is_directory(file))
+ m_collector->addDirectory(file);
+ else
m_collector->addFile(file);
- }
}
More information about the lldb-commits
mailing list