diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-12-11 07:48:14 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-12-11 07:48:14 +0000 |
commit | f64d25c633fc093528177c2e0fdd096d2f8706d2 (patch) | |
tree | bc90875fcecdeeaca7ec9e2071035263f1ef25a2 | |
parent | a89b618a04409c93b3b3c56d606a97a317567436 (diff) |
[PCH] Remove redundant stat call when validating the input files.
This became redundant after we removed the stat cache.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169830 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index e6d79519bf..5c25f58403 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -53,7 +53,6 @@ #include <algorithm> #include <cstdio> #include <iterator> -#include <sys/stat.h> using namespace clang; using namespace clang::serialization; @@ -1560,20 +1559,12 @@ ASTReader::getInputFile(ModuleFile &F, unsigned ID, bool Complain) { if (Overridden) return InputFile(File, Overridden); - // The stat info from the FileEntry came from the cached stat - // info of the PCH, so we cannot trust it. - struct stat StatBuf; - if (::stat(File->getName(), &StatBuf) != 0) { - StatBuf.st_size = File->getSize(); - StatBuf.st_mtime = File->getModificationTime(); - } - - if ((StoredSize != StatBuf.st_size + if ((StoredSize != 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. - || StoredTime != StatBuf.st_mtime + || StoredTime != File->getModificationTime() #endif )) { if (Complain) |