summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileManager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* fix PR7953 - Windows filename are case insensitive:Chris Lattner2010-08-231-0/+4
| | | | | | | | | | | | | | | | #pragma once wasn't working on win32 if the header file was included using a different case. I tracked down the problem to the fact that clang::FileManager was caching files using case sensitive string (UniqueFiles) on Windows. I changed FileManager to cache filename in lower case only. Doesn't affect UNIX because UNIX uses Inode to uniquely identify files. unix doesn't use this codepath. Analysis and patch by Francois Pichet! llvm-svn: 111866
* When remapping a virtual file, also make an entry for the file withDouglas Gregor2010-07-261-0/+12
| | | | | | | its absolute path on disk. Also, introduce a fun test for the precompiled preamble, which almost works... llvm-svn: 109470
* Pass StringRefs by value.Benjamin Kramer2010-07-141-2/+2
| | | | llvm-svn: 108375
* Removing trailing directory separator, to make stat workJohn Thompson2009-12-181-0/+5
| | | | llvm-svn: 91684
* FileManager: Do not cache failed stats, it is easy to construct commonDaniel Dunbar2009-12-111-10/+9
| | | | | | | | | | | | | | | | | | inconsistent situations if we do, and they are not important for PCH performance (which currently only needs the stats to construct the initial FileManager entries). - No test case, sorry, the machinations are too involved. This occurs when, for example, the build makes a PCH file and has a header map or a -I for a directory that does not yet exist. It is possible we will cache the negative stat on that directory, and then in the build we will never find header files inside that dir. For PCH we don't need these stats anyway for performance, so this also makes PCH files smaller w/ no loss. I hope to eventually eliminate the stat cache entirely. llvm-svn: 91082
* Extend -remap-file=from;to to permit mapping from a non-existentDouglas Gregor2009-12-021-22/+73
| | | | | | | | | | | | file. This is accomplished by introducing the notion of a "virtual" file into the file manager, which provides a FileEntry* for a named file whose size and modification time are known but which may not exist on disk. Added a cute little test that remaps both a .c file and a .h file it includes to alternative files. llvm-svn: 90329
* Add support for a chain of stat caches in the FileManager, rather thanDouglas Gregor2009-10-161-2/+37
| | | | | | | | | only supporting a single stat cache. The immediate benefit of this change is that we can now generate a PCH/AST file when including another PCH file; in the future, the chain of stat caches will likely be useful with multiple levels of PCH files. llvm-svn: 84263
* don't stick an uninitialized 'stat' buf into the stat cache, fill itChris Lattner2009-09-181-0/+1
| | | | | | with zeros. This avoids a GCC warning (PR5000) llvm-svn: 82194
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-29/+28
| | | | llvm-svn: 81346
* Replace some instances of std::string with StringRefs.Benjamin Kramer2009-09-051-0/+3
| | | | llvm-svn: 81079
* API changes to match llvm ToT.Chris Lattner2009-08-231-0/+1
| | | | llvm-svn: 79868
* Replace cerr with errs().Benjamin Kramer2009-08-231-12/+11
| | | | llvm-svn: 79854
* improve path handling, patch by Baptiste Lepilleur!Chris Lattner2009-08-121-0/+3
| | | | llvm-svn: 78824
* Implement caching of stat() calls for precompiled headers, which isDouglas Gregor2009-04-271-0/+18
| | | | | | | | essentially the same thing we do with pretokenized headers. stat() caching improves performance of the Cocoa-prefixed "Hello, World" by 45%. llvm-svn: 70223
* Remove the serialization code that predates precompiledDouglas Gregor2009-04-221-2/+0
| | | | | | | headers. Future approaches to (de-)serializing ASTs will be based on the PCH infrastructure. llvm-svn: 69828
* FileManager:Ted Kremenek2009-02-121-6/+4
| | | | | | | | | - set the 'StatSysCallCache' object using a setter method instead of FileManager's constructor. This allows the cache to be installed after the FileManager object is created. - Add 'file mode' to FileEntry (useful for stat caching) llvm-svn: 64351
* search and replaceo? Chris Lattner2009-02-121-1/+1
| | | | llvm-svn: 64348
* Add lightweight shim "clang::StatSysCallCache" that caches 'stat' system callsTed Kremenek2009-02-121-8/+10
| | | | | | | | | | for use by FileManager. FileManager now takes a StatSysCallCache* in its constructor (which defaults to NULL). This will be used for evaluating whether or not caching 'stat' system calls in PTH is a performance win. This shim adds no observable performance impact in the case where the 'StatSysCallCache*' is null. llvm-svn: 64345
* On Windows use a BumpPtrAllocator for the UniqueFileContainer's StringMap.Ted Kremenek2009-01-281-1/+1
| | | | llvm-svn: 63162
* FileManager: Use a BumpPtrAllocator for the StringMaps DirEntries and ↵Ted Kremenek2009-01-281-1/+0
| | | | | | | | | | FileEntries. Performance impact (clang -fsyntax-only INPUTS/Cocoa_h.m): non-PTH: 0.4% improvement PTH: 0.8% improvement llvm-svn: 63159
* Add a some comments to designate Windows-specific/Unix-specific code. No ↵Ted Kremenek2009-01-281-0/+12
| | | | | | functionality change. llvm-svn: 63157
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+275
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud