5 Commits

Author SHA1 Message Date
Fangrui Song
2ffd08308b Rename F_{None,Text,Append} to OF_{None,Text,Append}. NFC
F_{None,Text,Append} are kept for compatibility since r334221.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367800 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 05:43:48 +00:00
Alex Lorenz
412fa1a534 [FileCollector] Add a VFS that records FS accesses using the FileCollector
This patch adds a VFS that can be overlaid on top of another VFS
to record file system accesses using the FileCollector.
This can help to gather files that are needed for reproducers.

Differential Revision: https://reviews.llvm.org/D65411

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367278 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-29 23:38:30 +00:00
Alex Lorenz
52b7e93f00 [FileCollector] add support for recording empty directories
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 commit extends the file collector to allow
it to work with paths that are just directories, by constructing them as the
files are copied over.

Differential Revision: https://reviews.llvm.org/D65297

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367061 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-25 21:47:11 +00:00
Jonas Devlieghere
34a4dfe92a [FileCollector] Change coding style from LLDB to LLVM (NFC)
This patch changes the coding style of the FileCollector from the LLDB
to the LLVM coding style. Alex recently lifted it into LLVM and I
volunteered to do the conversion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366966 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-25 00:17:39 +00:00
Alex Lorenz
38ebc7caa2 [Support] move FileCollector from LLDB to llvm/Support
The file collector class is useful for creating reproducers,
not just for LLDB, but for other tools as well in LLVM/Clang.

Differential Revision: https://reviews.llvm.org/D65237

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366956 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-24 22:59:20 +00:00