Extend the FileCollector's API with addDirectory which adds a directory and its contents to the VFS mapping.
Details
- Reviewers
arphaman - Commits
- rG83dca6509196: Re-land "[FileCollector] Add a method to add a whole directory and it contents."
rG4151f2d04ad8: Re-land "[FileCollector] Add a method to add a whole directory and it contents."
rG8913769e353a: [FileCollector] Add a method to add a whole directory and it contents.
Diff Detail
Event Timeline
llvm/lib/Support/FileCollector.cpp | ||
---|---|---|
78 | It looks like the is_regular_file check doesn't take the previously used sys::fs::file_type::directory_file and sys::fs::file_type::symlink_file file types into account. Is that intentional? |
LGTM with one comment that needs to be fixed
llvm/lib/Support/FileCollector.cpp | ||
---|---|---|
232 | Could you also propagate the error to addDirectory and return early from this function if EC is set? |
This breaks tests on Windows: http://45.33.8.238/win/11469/step_11.txt
Please take a look and revert for now if investigating takes a while.
Also fails here:
http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/31579/steps/test-check-all/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/22835/steps/test-check-all/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-win-fast/builds/13422/steps/test-check-llvm-unit/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/6232/steps/test-check-llvm/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/6270/steps/test-check-llvm/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/41289/steps/test-check-all/logs/FAIL%3A%20LLVM-Unit%3A%3AFileCollectorTest.addDirectory
It looks like the is_regular_file check doesn't take the previously used sys::fs::file_type::directory_file and sys::fs::file_type::symlink_file file types into account. Is that intentional?