diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2020-05-12 13:18:35 -0700 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2020-05-12 15:59:24 -0700 |
| commit | ab22f71dd75895fbde1cd1a515b2164227d5dfd2 (patch) | |
| tree | 01642a56c1e211eba40f660b28be26a70da0883d /lldb/source/Host/common/FileSystem.cpp | |
| parent | 452e2fc409df4acd790fcb53872db5a1b8c0130a (diff) | |
[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.
Diffstat (limited to 'lldb/source/Host/common/FileSystem.cpp')
| -rw-r--r-- | lldb/source/Host/common/FileSystem.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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); - } } |
