aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/ASTUnit.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-03-18 19:23:38 +0000
committerAnders Carlsson <andersca@mac.com>2011-03-18 19:23:38 +0000
commit340415c0c7a7fdeb688fe5a0993bdd142cc9f59c (patch)
tree619f501bccee939ab72ed1421c002fafbe3b6ee4 /lib/Frontend/ASTUnit.cpp
parent7dbafb3ade491a41100c97597209455ee10c537d (diff)
Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/ASTUnit.cpp')
-rw-r--r--lib/Frontend/ASTUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Frontend/ASTUnit.cpp b/lib/Frontend/ASTUnit.cpp
index 32c805029c..621fcf190b 100644
--- a/lib/Frontend/ASTUnit.cpp
+++ b/lib/Frontend/ASTUnit.cpp
@@ -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 ||