aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-16 18:18:30 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-16 18:18:30 +0000
commit52e7108f51a4a9f4d6e84f33fb594d06e1d79560 (patch)
treeff52750d5e8ccf5cb5cc260f3afd5e13014ed9b6 /lib/Lex/PTHLexer.cpp
parent5f04881eb025f61396d0555d8173730fe2759e0a (diff)
Add support for a chain of stat caches in the FileManager, rather than
only supporting a single stat cache. The immediate benefit of this change is that we can now generate a PCH/AST file when including another PCH file; in the future, the chain of stat caches will likely be useful with multiple levels of PCH files. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index 36ace8be7e..f804f82c48 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/lib/Lex/PTHLexer.cpp
@@ -679,7 +679,8 @@ public:
CacheTy::iterator I = Cache.find(path);
// If we don't get a hit in the PTH file just forward to 'stat'.
- if (I == Cache.end()) return ::stat(path, buf);
+ if (I == Cache.end())
+ return StatSysCallCache::stat(path, buf);
const PTHStatData& Data = *I;