<< Entry->getName() << ErrorStr;
Buffer.setInt(true);
- } else if (FileInfo.st_size != Entry->getSize() ||
- FileInfo.st_mtime != Entry->getModificationTime()) {
- // Check that the file's size, modification time, and inode are
- // the same as in the file entry (which may have come from a
- // stat cache).
+ } else if (FileInfo.st_size != Entry->getSize()
+#if !defined(LLVM_ON_WIN32)
+ // In our regression testing, the Windows file system
+ // seems to have inconsistent modification times that
+ // sometimes erroneously trigger this error-handling
+ // path.
+ || FileInfo.st_mtime != Entry->getModificationTime()
+#endif
+ ) {
+ // Check that the file's size and modification time are the same
+ // as in the file entry (which may have come from a stat cache).
if (Diag.isDiagnosticInFlight())
Diag.SetDelayedDiagnostic(diag::err_file_modified,
Entry->getName());
return Failure;
}
- if ((off_t)Record[4] != File->getSize() ||
- (time_t)Record[5] != File->getModificationTime()) {
+ if ((off_t)Record[4] != File->getSize()
+#if !defined(LLVM_ON_WIN32)
+ // In our regression testing, the Windows file system seems to
+ // have inconsistent modification times that sometimes
+ // erroneously trigger this error-handling path.
+ || (time_t)Record[5] != File->getModificationTime()
+#endif
+ ) {
Diag(diag::err_fe_pch_file_modified)
<< Filename;
return Failure;