summaryrefslogtreecommitdiffstats
path: root/clang
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
commit9583f794c305899d5ca966e99d922b8f85801fc5 (patch)
tree311b603582f6f18ae958e7ea465ec9f00181430c /clang
parent5e368405628f6abadfa3ee632ffa7d03da5a80b5 (diff)
downloadbcm5719-llvm-9583f794c305899d5ca966e99d922b8f85801fc5.tar.gz
bcm5719-llvm-9583f794c305899d5ca966e99d922b8f85801fc5.zip
Use the newly added FileManager::getNoncachedStatValue when trying to determine if any files in the preamble have changed.
llvm-svn: 127894
Diffstat (limited to 'clang')
-rw-r--r--clang/lib/Frontend/ASTUnit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Frontend/ASTUnit.cpp b/clang/lib/Frontend/ASTUnit.cpp
index 32c805029cb..621fcf190b7 100644
--- a/clang/lib/Frontend/ASTUnit.cpp
+++ b/clang/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 ||
OpenPOWER on IntegriCloud