]> granicus.if.org Git - clang/commitdiff
Use the newly added FileManager::getNoncachedStatValue when trying to determine if...
authorAnders Carlsson <andersca@mac.com>
Fri, 18 Mar 2011 19:23:38 +0000 (19:23 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 18 Mar 2011 19:23:38 +0000 (19:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127894 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTUnit.cpp

index 32c805029cb3d3713e47bf0b2652ee800853000e..621fcf190b7b870f2c6febbcb221720fe1267743 100644 (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 ||