ilya-biryukov added a comment.
> I would call it a requirement instead of an assumption. The replay must be
> exactly the same (even the file stats and reads). If Clang reads the file in
> replay which was only stat()ed during compilation, it indicates
> non-determinism or something wrong (in c
usaxena95 added inline comments.
Comment at: lib/Basic/VirtualFileSystem.cpp:2097
void YAMLVFSWriter::write(llvm::raw_ostream &OS) {
- llvm::sort(Mappings, [](const YAMLVFSEntry &LHS, const YAMLVFSEntry &RHS) {
+ llvm::sort(Mappings.begin(), Mappings.end(),
+ [](co
usaxena95 added a comment.
> it sounds like this is for record-replay.
Yes this is for record-replay purpose.
> What are these files in practice?
During loading a modules the files that were required to make the module are
stat()ed and their sizes are used to verify that the module is still va
kbobyrev added inline comments.
Comment at: lib/Basic/VirtualFileSystem.cpp:2097
void YAMLVFSWriter::write(llvm::raw_ostream &OS) {
- llvm::sort(Mappings, [](const YAMLVFSEntry &LHS, const YAMLVFSEntry &RHS) {
+ llvm::sort(Mappings.begin(), Mappings.end(),
+ [](con
sammccall added a comment.
Could you give some more detail about what this is for?
- it sounds like this is for record-replay. In the replayed compilation, we
assume the accessed files are the same, is it safe to assume we never read
files we previously stat()ed? What are these files in practic
usaxena95 created this revision.
Herald added subscribers: cfe-commits, mgrang.
Some files are only Statted by Clang and not read. Clang mostly uses
them for checking the existence of some files and in rare cases uses the
value of the Status to proceed further (for example while loading
module fil