summaryrefslogtreecommitdiffstats
path: root/clang/lib/Serialization/ASTReader.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-11 07:48:14 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-12-11 07:48:14 +0000
commit53c3877f94635ed77ccb35cd1dffc3b44e42dff4 (patch)
treea5f8afbfb9e93d8f747e571103ba12dc81d0161a /clang/lib/Serialization/ASTReader.cpp
parente65856fe60f31a23aa5c5a6d8e7e93e551ce3480 (diff)
downloadbcm5719-llvm-53c3877f94635ed77ccb35cd1dffc3b44e42dff4.tar.gz
bcm5719-llvm-53c3877f94635ed77ccb35cd1dffc3b44e42dff4.zip
[PCH] Remove redundant stat call when validating the input files.
This became redundant after we removed the stat cache. llvm-svn: 169830
Diffstat (limited to 'clang/lib/Serialization/ASTReader.cpp')
-rw-r--r--clang/lib/Serialization/ASTReader.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/clang/lib/Serialization/ASTReader.cpp b/clang/lib/Serialization/ASTReader.cpp
index e6d79519bf6..5c25f584038 100644
--- a/clang/lib/Serialization/ASTReader.cpp
+++ b/clang/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)
OpenPOWER on IntegriCloud