[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.
This commit is contained in:
Jonas Devlieghere
2020-05-12 13:18:35 -07:00
parent 452e2fc409
commit ab22f71dd7

View File

@@ -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);
}
}