Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.

llvm-svn: 127894
This commit is contained in:
Anders Carlsson 2011-03-18 19:23:38 +00:00
parent 5e36840562
commit 9583f794c3
1 changed files with 2 additions and 2 deletions

View File

@ -1185,7 +1185,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
!AnyFileChanged && R != REnd;
++R) {
struct stat StatBuf;
if (stat(R->second.c_str(), &StatBuf)) {
if (FileMgr->getNoncachedStatValue(R->second, StatBuf)) {
// If we can't stat the file we're remapping to, assume that something
// horrible happened.
AnyFileChanged = true;
@ -1223,7 +1223,7 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
// The file was not remapped; check whether it has changed on disk.
struct stat StatBuf;
if (stat(F->first(), &StatBuf)) {
if (FileMgr->getNoncachedStatValue(F->first(), StatBuf)) {
// If we can't stat the file, assume that something horrible happened.
AnyFileChanged = true;
} else if (StatBuf.st_size != F->second.first ||