diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-09 15:54:22 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-09 15:54:22 +0000 |
commit | 08288f28462e4a8d75d40c456190168b2b8cad1d (patch) | |
tree | b27f2835b96c93613449f90d3820e3a9b74d7c3e /clang/lib/Basic/SourceManager.cpp | |
parent | cdabb31d6f08c75c8af48828613ae9833d1a058a (diff) | |
download | llvm-08288f28462e4a8d75d40c456190168b2b8cad1d.zip llvm-08288f28462e4a8d75d40c456190168b2b8cad1d.tar.gz llvm-08288f28462e4a8d75d40c456190168b2b8cad1d.tar.bz2 |
On Windows, disable the modification-time check for files used in
precompiled headers and/or when reading the contents of the file into
memory. These checks seem to be causing spurious regression-test
failures on Windows.
llvm-svn: 100866
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 27cb9be..27a859c 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -98,11 +98,17 @@ const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag, << 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()); |