This is an archive of the discontinued LLVM Phabricator instance.

[FileCollector] add support for recording empty directories
ClosedPublic

Authored by arphaman on Jul 25 2019, 1:05 PM.

Details

Summary

The file collector class is useful for constructing reproducers by creating a snapshot of the files that are accessed. Sometimes it might also be important to construct directories that don't necessarily have files, but are still accessed by some tool that we want to make a reproducer for. This is useful for instance for modeling the behavior of Clang's header search, which scans through a number of directories it doesn't actually access when looking for framework headers. This patch extends the file collector to allow it to work with paths that are just directories, by constructing them as the files are copied over.

Diff Detail

Repository
rL LLVM

Event Timeline

arphaman created this revision.Jul 25 2019, 1:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 25 2019, 1:05 PM
JDevlieghere accepted this revision.Jul 25 2019, 2:14 PM

LGTM!

llvm/lib/Support/FileCollector.cpp
151 ↗(On Diff #211804)

Spurious newline?

This revision is now accepted and ready to land.Jul 25 2019, 2:14 PM
arphaman marked an inline comment as done.Jul 25 2019, 2:45 PM
This revision was automatically updated to reflect the committed changes.