Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Michael J. Spencer 256053b31e Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122087 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-17 21:22:22 +00:00
Chris Lattner c0f31fd085 attempt to fix a buildbot failure, apparently apache fails to build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-02 04:27:29 +00:00
Michael J. Spencer 03013fa9a0 Merge System into Support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29 18:12:39 +00:00
Francois Pichet 0d4739abf6 Fix 2 problems with Chris Lattner's FileManager redesign on Windows.
- FileEntry::operator= is needed on Win32.
- There was an error in the S_ISDIR() macro.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120079 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-24 03:07:43 +00:00
Chris Lattner 5cc1c738b0 The final result of all this refactoring: instead of doing stat immediately
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120066 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 22:32:37 +00:00
Chris Lattner b2b93c12d7 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120062 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 21:53:56 +00:00
Chris Lattner 898a061f69 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120060 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 21:17:56 +00:00
Chris Lattner 72f6130a17 replicate a terrible hack to fix a build error on VC++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120039 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:07:39 +00:00
Chris Lattner d6f6111980 simplify the cache miss handling code, eliminating CacheMissing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120038 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 20:05:15 +00:00
Chris Lattner f8f6129861 r120013 dropped passing in the precomputed file size to
MemoryBuffer::getFile, causing us to pick up a fstat for
every file.  Restore the optimization.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120032 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:38:22 +00:00
Chris Lattner 74e976ba4b 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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120031 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:28:12 +00:00
Chris Lattner 10e286aa8d rework the stat cache, pulling it out of FileManager.h into
its own header and giving it some more structure.  No 
functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120030 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-23 19:19:34 +00:00