aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileSystemStatCache.cpp
AgeCommit message (Collapse)AuthorFilesLines
2012-12-11Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis1-9/+11
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
2011-12-20Unweaken vtables as per ↵David Blaikie1-0/+2
http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
2010-12-17Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer1-1/+1
llvm-svn: 122087
2010-12-02attempt to fix a buildbot failure, apparently apache fails to build.Chris Lattner1-1/+1
llvm-svn: 120688
2010-11-29Merge System into Support.Michael J. Spencer1-1/+1
llvm-svn: 120297
2010-11-24Fix 2 problems with Chris Lattner's FileManager redesign on Windows.Francois Pichet1-1/+1
- FileEntry::operator= is needed on Win32. - There was an error in the S_ISDIR() macro. llvm-svn: 120079
2010-11-23The final result of all this refactoring: instead of doing stat immediatelyChris Lattner1-3/+38
followed by an open for every source file we open, probe the file system with 'open' and then do an fstat when it succeeds. open+fstat is faster than stat+open because the kernel only has to perform the string->inode mapping once. Presumably it gets faster the deeper in your filesystem a lookup happens. For -Eonly on cocoa.h, this reduces system time from 0.042s to 0.039s on my machine, a 7.7% speedup. llvm-svn: 120066
2010-11-23if we succeed in opening a directory but expected a file, ensure we don'tChris Lattner1-1/+22
leak a filedescriptor if a client ever starts returning one. llvm-svn: 120062
2010-11-23change the 'is directory' indicator to be a null-or-notChris Lattner1-2/+28
pointer that is passed down through the APIs, and make FileSystemStatCache::get be the one that filters out directory lookups that hit files. This also paves the way to have stat queries be able to return opened files. llvm-svn: 120060
2010-11-23replicate a terrible hack to fix a build error on VC++Chris Lattner1-0/+4
llvm-svn: 120039
2010-11-23simplify the cache miss handling code, eliminating CacheMissing.Chris Lattner1-6/+1
llvm-svn: 120038
2010-11-23r120013 dropped passing in the precomputed file size to Chris Lattner1-1/+0
MemoryBuffer::getFile, causing us to pick up a fstat for every file. Restore the optimization. llvm-svn: 120032
2010-11-23PCH files only cache successful stats. Remove the code that reads/writes Chris Lattner1-1/+1
the result code of the stat to/from the PCH file since it is always 0. llvm-svn: 120031
2010-11-23rework the stat cache, pulling it out of FileManager.h intoChris Lattner1-0/+40
its own header and giving it some more structure. No functionality change. llvm-svn: 120030