This is an archive of the discontinued LLVM Phabricator instance.

[FileCollector] Add a method to add a whole directory and it contents.
ClosedPublic

Authored by JDevlieghere on Mar 23 2020, 11:23 PM.

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 23 2020, 11:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 23 2020, 11:24 PM
arphaman added inline comments.Mar 27 2020, 11:40 AM
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?

JDevlieghere marked an inline comment as done.

Rebase & fix missing file types.

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?

arphaman accepted this revision.Mar 27 2020, 2:59 PM
This revision is now accepted and ready to land.Mar 27 2020, 2:59 PM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Mar 27 2020, 6:16 PM

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.