Chris Lattner
f77e11ba05
if we succeed in opening a directory but expected a file, ensure we don't
...
leak a filedescriptor if a client ever starts returning one.
llvm-svn: 120062
2010-11-23 21:53:56 +00:00
Chris Lattner
dd278430a3
change the 'is directory' indicator to be a null-or-not
...
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-23 21:17:56 +00:00
Chris Lattner
ea61b32c4a
replicate a terrible hack to fix a build error on VC++
...
llvm-svn: 120039
2010-11-23 20:07:39 +00:00
Chris Lattner
8f0583daa2
simplify the cache miss handling code, eliminating CacheMissing.
...
llvm-svn: 120038
2010-11-23 20:05:15 +00:00
Chris Lattner
b3c814538b
r120013 dropped passing in the precomputed file size to
...
MemoryBuffer::getFile, causing us to pick up a fstat for
every file. Restore the optimization.
llvm-svn: 120032
2010-11-23 19:38:22 +00:00
Chris Lattner
2a6fa47b26
PCH files only cache successful stats. Remove the code that reads/writes
...
the result code of the stat to/from the PCH file since it is always 0.
llvm-svn: 120031
2010-11-23 19:28:12 +00:00
Chris Lattner
226efd356c
rework the stat cache, pulling it out of FileManager.h into
...
its own header and giving it some more structure. No
functionality change.
llvm-svn: 120030
2010-11-23 19:19:34 +00:00