summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileSystemStatCache.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis2012-12-111-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
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+2
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146959
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-171-1/+1
| | | | llvm-svn: 122087
* attempt to fix a buildbot failure, apparently apache fails to build.Chris Lattner2010-12-021-1/+1
| | | | llvm-svn: 120688
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120297
* Fix 2 problems with Chris Lattner's FileManager redesign on Windows.Francois Pichet2010-11-241-1/+1
| | | | | | | - FileEntry::operator= is needed on Win32. - There was an error in the S_ISDIR() macro. llvm-svn: 120079
* The final result of all this refactoring: instead of doing stat immediatelyChris Lattner2010-11-231-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
* if we succeed in opening a directory but expected a file, ensure we don'tChris Lattner2010-11-231-1/+22
| | | | | | leak a filedescriptor if a client ever starts returning one. llvm-svn: 120062
* change the 'is directory' indicator to be a null-or-notChris Lattner2010-11-231-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
* replicate a terrible hack to fix a build error on VC++Chris Lattner2010-11-231-0/+4
| | | | llvm-svn: 120039
* simplify the cache miss handling code, eliminating CacheMissing.Chris Lattner2010-11-231-6/+1
| | | | llvm-svn: 120038
* r120013 dropped passing in the precomputed file size to Chris Lattner2010-11-231-1/+0
| | | | | | | MemoryBuffer::getFile, causing us to pick up a fstat for every file. Restore the optimization. llvm-svn: 120032
* PCH files only cache successful stats. Remove the code that reads/writes Chris Lattner2010-11-231-1/+1
| | | | | | the result code of the stat to/from the PCH file since it is always 0. llvm-svn: 120031
* rework the stat cache, pulling it out of FileManager.h intoChris Lattner2010-11-231-0/+40
its own header and giving it some more structure. No functionality change. llvm-svn: 120030
OpenPOWER on IntegriCloud