From 3b7793797f773ee0132b38767b104ad80af75229 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Tue, 11 Dec 2012 07:48:23 +0000 Subject: Extend stat query APIs to explicitly specify if the query is for a file or directory, allowing just a stat call if a file descriptor is not needed. Doing just 'stat' is faster than 'open/fstat/close'. This has the effect of cutting down system time for validating the input files of a PCH. llvm-svn: 169831 --- clang/unittests/Basic/FileManagerTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/unittests/Basic/FileManagerTest.cpp') diff --git a/clang/unittests/Basic/FileManagerTest.cpp b/clang/unittests/Basic/FileManagerTest.cpp index 0a83a3aeb73..a55fcbf76cf 100644 --- a/clang/unittests/Basic/FileManagerTest.cpp +++ b/clang/unittests/Basic/FileManagerTest.cpp @@ -51,7 +51,7 @@ public: // Implement FileSystemStatCache::getStat(). virtual LookupResult getStat(const char *Path, struct stat &StatBuf, - int *FileDescriptor) { + bool isFile, int *FileDescriptor) { if (StatCalls.count(Path) != 0) { StatBuf = StatCalls[Path]; return CacheExists; -- cgit v1.2.3