[cfe-commits] r127894 - /cfe/trunk/lib/Frontend/ASTUnit.cpp

Anders Carlsson andersca at mac.com
Fri Mar 18 12:23:38 PDT 2011


Author: andersca
Date: Fri Mar 18 14:23:38 2011
New Revision: 127894

URL: http://llvm.org/viewvc/llvm-project?rev=127894&view=rev
Log:
Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.

Modified:
    cfe/trunk/lib/Frontend/ASTUnit.cpp

Modified: cfe/trunk/lib/Frontend/ASTUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/ASTUnit.cpp?rev=127894&r1=127893&r2=127894&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/ASTUnit.cpp (original)
+++ cfe/trunk/lib/Frontend/ASTUnit.cpp Fri Mar 18 14:23:38 2011
@@ -1185,7 +1185,7 @@
            !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 @@
         
         // 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 || 





More information about the cfe-commits mailing list