summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CacheTokens.cpp
Commit message (Collapse)AuthorAgeFilesLines
* unique_ptr-ify FileSystemStatCache::setNextStatCacheDavid Blaikie2014-08-111-2/+4
| | | | | | | | | | And in the process, discover that FileManager::removeStatCache had a double-delete when removing an element from the middle of the list (at the beginning or the end of the list, there was no problem) and add a unit test to exercise the code path (which successfully crashed when run (with modifications to match the old API) without this patch applied) llvm-svn: 215388
* Improve memory ownership of vfs::Files in the FileSystemStatCache by using ↵David Blaikie2014-07-081-1/+2
| | | | | | | | | std::unique_ptr Spotted after a memory leak (due to the complexities of manual memory management) was fixed in 212466. llvm-svn: 212541
* [C++11] Use 'nullptr'. Frontend edition.Craig Topper2014-05-221-3/+3
| | | | llvm-svn: 209389
* Teach users of OnDiskHashTable to define hash_value and offset typesJustin Bogner2014-04-181-2/+8
| | | | | | | | This paves the way to making OnDiskHashTable work with hashes that are not 32 bits wide and to making OnDiskHashTable work very large hash tables. The LLVM change to use these types is upcoming. llvm-svn: 206640
* Remove OnDiskHashTable.h, since it's been moved to llvmJustin Bogner2014-04-181-6/+10
| | | | llvm-svn: 206637
* Reapply "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-281-20/+39
| | | | | | | | | | | | | Committed this by accident before it was done last time. Original message: Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205061
* Revert "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"Justin Bogner2014-03-281-39/+20
| | | | | | This reverts commit r205044. llvm-svn: 205047
* OnDiskHashTable: Use EndianStream.h to write little endian ostreamsJustin Bogner2014-03-281-20/+39
| | | | | | | | | Rather than rolling our own functions to write little endian data to an ostream, we can use the support in llvm's EndianStream.h. No functional change. llvm-svn: 205044
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-131-1/+1
| | | | | | class. llvm-svn: 203758
* Recommit virtual file systemBen Langmuir2014-02-201-2/+2
| | | | | | | | | | | Previously reverted in r201755 due to causing an assertion failure. I've removed the offending assertion, and taught the CompilerInstance to create a default virtual file system inside createFileManager. In the future, we should be able to reach into the CompilerInvocation to customize this behaviour without breaking clients that don't care. llvm-svn: 201818
* Reverting the virtual file system implementation, because it triggers an ↵Juergen Ributzka2014-02-201-2/+2
| | | | | | | | | | assertion in our internal build bots. This reverts commits 201618, 201635, 201636, 201639, 201685, 201691, and 201696. llvm-svn: 201755
* Initial implementation of virtual file systemBen Langmuir2014-02-191-2/+2
| | | | | | | | | | | | This adds the minimum virtual file system support to start migrating FileManager onto the VFS. Originally discussed here: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2014-February/035188.html Differential Revision: http://llvm-reviews.chandlerc.com/D2745 llvm-svn: 201618
* Use llvm::sys::fs::UniqueID for windows and unix.Rafael Espindola2013-08-011-23/+22
| | | | | | | | | | | | | | | | | | | This unifies the unix and windows versions of FileManager::UniqueDirContainer and FileManager::UniqueFileContainer by using UniqueID. We cannot just replace "struct stat" with llvm::sys::fs::file_status, since we want to be able to construct fake ones, and file_status has different members on unix and windows. What the patch does is: * Record only the information that clang is actually using. * Use llvm::sys::fs::status instead of stat and fstat. * Use llvm::sys::fs::UniqueID * Delete the old windows versions of UniqueDirContainer and UniqueFileContainer since the "unix" one now works on windows too. llvm-svn: 187619
* Extend stat query APIs to explicitly specify if the query is forArgyrios Kyrtzidis2012-12-111-2/+2
| | | | | | | | | | 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
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-1/+1
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Switch PTH format from a 7 byte magic number to an 8 byte one, to avoidRichard Smith2012-08-171-1/+1
| | | | | | misaligned reads throughout the file. Bump PTH format version to 10. llvm-svn: 162076
* Unify naming of LangOptions variable/get function across the Clang stack ↵David Blaikie2012-03-111-1/+1
| | | | | | | | | | (Lex to AST). The member variable is always "LangOpts" and the member function is always "getLangOpts". Reviewed by Chris Lattner llvm-svn: 152536
* Basic: import SmallString<> into clang namespaceDylan Noblesmith2012-02-051-1/+1
| | | | | | | (I was going to fix the TODO about DenseMap too, but that would break self-host right now. See PR11922.) llvm-svn: 149799
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-10/+10
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* Make more use of llvm::StringRef in various APIs. In particular, don'tJay Foad2011-06-211-4/+3
| | | | | | use the deprecated forms of llvm::StringMap::GetOrCreateValue(). llvm-svn: 133515
* Currently we can only remap a file by creating a MemoryBuffer and replacing ↵Argyrios Kyrtzidis2011-03-051-1/+1
| | | | | | | | | the file contents with it. Allow remapping a file by specifying another filename whose contents should be loaded if the original file gets loaded. This allows to override files without having to create & load buffers in advance. llvm-svn: 127052
* Rename tok::eom to tok::eod.Peter Collingbourne2011-02-281-2/+2
| | | | | | | | The previous name was inaccurate as this token in fact appears at the end of every preprocessing directive, not just macro definitions. No functionality change, except for a diagnostic tweak. llvm-svn: 126631
* Introduced raw_identifier token kind.Abramo Bagnara2010-12-221-4/+4
| | | | llvm-svn: 122394
* Replace all uses of PathV1::makeAbsolute with PathV2::fs::make_absolute.Michael J. Spencer2010-12-211-2/+3
| | | | llvm-svn: 122340
* Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.Michael J. Spencer2010-12-171-3/+2
| | | | llvm-svn: 122087
* Merge System into Support.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120297
* change the 'is directory' indicator to be a null-or-notChris Lattner2010-11-231-2/+3
| | | | | | | | | 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
* simplify the cache miss handling code, eliminating CacheMissing.Chris Lattner2010-11-231-8/+3
| | | | llvm-svn: 120038
* rework the stat cache, pulling it out of FileManager.h intoChris Lattner2010-11-231-13/+19
| | | | | | | its own header and giving it some more structure. No functionality change. llvm-svn: 120030
* zap dead code.Chris Lattner2010-09-041-2/+0
| | | | llvm-svn: 113074
* PTH generation: Don't save the leading '#' token in a null directive. This ↵Ted Kremenek2010-07-271-4/+9
| | | | | | unbreaks using PTH with Boost (<rdar://problem/8227989>). llvm-svn: 109484
* push some source location information down through the compiler,Chris Lattner2010-04-201-3/+2
| | | | | | | | into ContentCache::getBuffer. This allows it to produce diagnostics on the broken #include line instead of without a location. llvm-svn: 101939
* Make some typedefs privateKovarththanan Rajaratnam2010-03-181-2/+3
| | | | llvm-svn: 98817
* Rename variable to indicate what it is being used forKovarththanan Rajaratnam2010-03-181-4/+4
| | | | llvm-svn: 98816
* Entering the main source file in the preprocessor can fail if theDouglas Gregor2010-03-171-1/+2
| | | | | | source file has been changed. Handle that failure more gracefully. llvm-svn: 98727
* Use SourceManager's Diagnostic object for all file-reading errors,Douglas Gregor2010-03-161-1/+1
| | | | | | simplifying the SourceManager interfaces somewhat. llvm-svn: 98598
* Add EmitString helper methodKovarththanan Rajaratnam2010-03-141-2/+6
| | | | llvm-svn: 98488
* Unbreak last commit. This should have been part of r98478.Kovarththanan Rajaratnam2010-03-141-3/+3
| | | | llvm-svn: 98480
* Pass file string by referenceKovarththanan Rajaratnam2010-03-141-6/+4
| | | | llvm-svn: 98478
* Use makeAbsolute()Kovarththanan Rajaratnam2010-03-141-7/+2
| | | | llvm-svn: 98472
* Move to anonymous namespaceKovarththanan Rajaratnam2010-03-141-1/+1
| | | | llvm-svn: 98469
* No need to call setIdentifierInfo() after LookUpIdentifierInfo() which ↵Kovarththanan Rajaratnam2010-03-131-3/+2
| | | | | | LookUpIdentifierInfo() will automatically do llvm-svn: 98435
* Don't rely on implicit conversionKovarththanan Rajaratnam2010-03-071-2/+2
| | | | llvm-svn: 97916
* Use clang::io::Emit8Kovarththanan Rajaratnam2010-03-051-3/+1
| | | | llvm-svn: 97810
* Move Emit24 to clang::ioKovarththanan Rajaratnam2010-03-021-6/+1
| | | | llvm-svn: 97569
* Use the llvm coding convention for indentation for switch.Mike Stump2010-01-201-19/+19
| | | | llvm-svn: 93966
* Fix PR5633 by making the preprocessor handle the case where we canChris Lattner2009-11-301-1/+2
| | | | | | | | | | stat a file but where mmaping it fails. In this case, we emit an error like: t.c:1:10: fatal error: error opening file '../../foo.h' instead of "cannot find file". llvm-svn: 90110
* Remove VISIBILITY_HIDDEN from anonymous namespaces in libFrontend.Benjamin Kramer2009-11-281-6/+5
| | | | llvm-svn: 90033
* PR5218: Replace IdentifierInfo::getName with StringRef version, now that clientsDaniel Dunbar2009-10-181-1/+1
| | | | | | are updated. llvm-svn: 84447
* Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar2009-10-181-2/+2
| | | | llvm-svn: 84436
OpenPOWER on IntegriCloud