summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PTHLexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't emit end-of-file diagnostics like "unterminated conditional" orDouglas Gregor2010-08-121-2/+3
| | | | | | "unterminated string" when we're performing code completion. llvm-svn: 110933
* Add PTHLexer::LexEndOfFile() to emit diagnostics at end-of-file similar to ↵Ted Kremenek2010-07-271-4/+25
| | | | | | those by Lexer::LexEndOfFile(). llvm-svn: 109486
* Switch over IdentifierInfoLookup to StringRefKovarththanan Rajaratnam2010-03-121-5/+5
| | | | llvm-svn: 98337
* Remove remaining VISIBILITY_HIDDEN from anonymous namespaces.Benjamin Kramer2009-11-281-8/+7
| | | | llvm-svn: 90044
* Cleanup llvm/Support/Compiler.h include in header filesKovarththanan Rajaratnam2009-11-281-0/+1
| | | | llvm-svn: 90040
* Switch PTHManager to using diagnostics for most errors.Daniel Dunbar2009-11-121-24/+15
| | | | | | Also, always give errors on a token-cache PTH failure. llvm-svn: 86939
* Add Diagnostic::Report method for reporting diagnostics without a location.Daniel Dunbar2009-11-101-5/+4
| | | | llvm-svn: 86760
* Move clients to use IdentifierInfo::getNameStart() instead of getName()Daniel Dunbar2009-10-181-9/+1
| | | | llvm-svn: 84436
* Switch to llvm::HashString.Daniel Dunbar2009-10-171-3/+4
| | | | llvm-svn: 84375
* Add support for a chain of stat caches in the FileManager, rather thanDouglas Gregor2009-10-161-1/+2
| | | | | | | | | 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
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-109/+109
| | | | llvm-svn: 81346
* Replace cerr with errs().Benjamin Kramer2009-08-231-1/+1
| | | | llvm-svn: 79854
* Move the on-disk hash table code into its own header. No functionality change.Douglas Gregor2009-04-201-171/+2
| | | | llvm-svn: 69580
* PTHManager::Create():Ted Kremenek2009-03-221-18/+16
| | | | | | | | | | | - Make the Diagnostic::Level for PTH errors to be specified by the caller clang (driver): - Set the PTHManager diagnostic level to "Diagnostic::Error" for -include-pth (a hard error) and Diagnostic::Warning for -token-cache (we can still proceed). llvm-svn: 67462
* Add back warning about a PTH file not containing any identifiers, but don't makeTed Kremenek2009-03-211-0/+6
| | | | | | it a hard error. llvm-svn: 67424
* Allow PTH files with no identifiers.Ted Kremenek2009-03-211-5/+0
| | | | llvm-svn: 67423
* PTHManager::Create() now creates a PTHManager even if the PTH file contains noTed Kremenek2009-03-201-4/+5
| | | | | | cached tokens. This is for use with -include-pth. llvm-svn: 67385
* Add PTHManager::getOriginalSourceFile(), a method that returns the name of theTed Kremenek2009-03-191-3/+12
| | | | | | original source file (if any) that was used to generate the PTH cache. llvm-svn: 67343
* Move PTHStatCache within the anonymous namespace.Ted Kremenek2009-02-231-1/+1
| | | | llvm-svn: 65348
* Fix another PTH warning that should not be a note.Ted Kremenek2009-02-191-1/+1
| | | | llvm-svn: 65072
* Make PTH warnings actual warnings instead of 'notes'.Ted Kremenek2009-02-191-1/+1
| | | | llvm-svn: 65071
* PTH: Cache directory and negative 'stat' calls. This gives us a 1% ↵Ted Kremenek2009-02-131-3/+9
| | | | | | performance improvement on Cocoa.h (fsyntax-only+PTH). llvm-svn: 64490
* Add some boilerplate to the PTH file to prepare for the caching of stats for ↵Ted Kremenek2009-02-131-29/+55
| | | | | | directories (and negative stats too). llvm-svn: 64477
* Fix gcc warning: gcc correctly notes that const-qualifying the return Eli Friedman2009-02-131-2/+2
| | | | | | type doesn't do anything. llvm-svn: 64424
* Fix assertion when input is an empty string.Daniel Dunbar2009-02-121-1/+1
| | | | llvm-svn: 64397
* Re-enable PTH stat caching. All tests pass now.Ted Kremenek2009-02-121-2/+1
| | | | llvm-svn: 64356
* Fix bad reading of bytes in ReadUnalignedLE64() (copy-paste error).Ted Kremenek2009-02-121-4/+4
| | | | llvm-svn: 64355
* Temporarily disable PTH stat caching as it appears to be failing on some ↵Ted Kremenek2009-02-121-1/+2
| | | | | | machines. llvm-svn: 64354
* PTH: Cache stat information for files in the PTH file. Hook up FileManagerTed Kremenek2009-02-121-10/+100
| | | | | | | | | | | | | to use this stat information in the PTH file using a 'StatSysCallCache' object. Performance impact (Cocoa.h, PTH): - number of stat calls reduces from 1230 to 425 - fsyntax-only: time improves by 4.2% We can reduce the number of stat calls to almost zero by caching negative stat calls and directory stat calls in the PTH file as well. llvm-svn: 64353
* PTH: Have meta data be at the beginning of the PTH file, not the end.Ted Kremenek2009-02-111-6/+6
| | | | llvm-svn: 64338
* PTH: Replace string identifier to persistent ID lookup with a hashtable. This isTed Kremenek2009-02-111-54/+89
| | | | | | | actually *slightly* slower than the binary search. Since this is algorithmically better, further performance tuning should be able to make this faster. llvm-svn: 64326
* PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data isTed Kremenek2009-02-111-4/+4
| | | | | | referenced by other tables. llvm-svn: 64304
* PTH: Replace ad hoc 'file name' -> 'PTH data' lookup table in the PTH file ↵Ted Kremenek2009-02-101-52/+158
| | | | | | with an on-disk chained hash table. This data structure is implemented using templates, and will be used to replace similar data structures. This change leads to no visibile performance impact on Cocoa.h, but now we only pay a price for the table on order with the number of files accessed and not the number in the PTH file. llvm-svn: 64245
* Add more PTH diagnostics for invalid PTH files, etc.Ted Kremenek2009-01-281-11/+29
| | | | llvm-svn: 63232
* Enhance PTHManager::Create() to take an optional Diagnostic* argument that ↵Ted Kremenek2009-01-281-2/+9
| | | | | | can be used to report issues such as a missing PTH file. llvm-svn: 63231
* PTH: Use Token::setLiteralData() to directly store a pointer to cached ↵Ted Kremenek2009-01-271-145/+23
| | | | | | | | | | spelling data in the PTH file. This removes a ton of code for looking up spellings using sourcelocations in the PTH file. This simplifies both PTH-generation and reading. Performance impact for -fsyntax-only on Cocoa.h (with Cocoa.h in the PTH file): - PTH generation time improves by 5% - PTH reading improves by 0.3%. llvm-svn: 63072
* Silence warning.Ted Kremenek2009-01-261-1/+1
| | | | llvm-svn: 63054
* Add version number checking to PTH files.Ted Kremenek2009-01-261-2/+8
| | | | llvm-svn: 63047
* Embed the offset of the PTH table inside the prologue of the PTH file. This ↵Ted Kremenek2009-01-261-9/+10
| | | | | | will help improve gradual versioning of PTH files instead of relying that the PTH table is at a fixed offset. llvm-svn: 63045
* Check in the long promised SourceLocation rewrite. This lays theChris Lattner2009-01-261-3/+2
| | | | | | | | | | ground work for implementing #line, and fixes the "out of macro ID's" problem. There is nothing particularly tricky about the code, other than the very performance sensitive SourceManager::getFileID() method. llvm-svn: 62978
* This is a follow-up to r62675:Chris Lattner2009-01-231-0/+6
| | | | | | | | | | Refactor how the preprocessor changes a token from being an tok::identifier to a keyword (e.g. tok::kw_for). Instead of doing this in HandleIdentifier, hoist this common case out into the caller, so that every keyword doesn't have to go through HandleIdentifier. This drops time in HandleIdentifier from 1.25ms to .62ms, and speeds up clang -Eonly with PTH by about 1%. llvm-svn: 62855
* Update comment.Chris Lattner2009-01-231-2/+2
| | | | llvm-svn: 62819
* remove my gross #ifdef's, using portable abstractions now that the 32-bitChris Lattner2009-01-221-11/+8
| | | | | | | | load is always aligned. I verified that the bswap doesn't occur in the assembly code on x86. llvm-svn: 62815
* remove Read8/Read24, which are dead. Rename Read16/Read32 to be moreChris Lattner2009-01-221-58/+30
| | | | | | descriptive. llvm-svn: 62775
* Fix <rdar://problem/6512717> by correctly reading the right offset in the ↵Ted Kremenek2009-01-211-1/+1
| | | | | | token data in PTHLexer::getSourceLocation(). llvm-svn: 62725
* merge two checks for identifiers in the pth loop into one.Chris Lattner2009-01-211-9/+10
| | | | llvm-svn: 62677
* Add a bit to IdentifierInfo that acts as a simple predicate whichChris Lattner2009-01-211-1/+3
| | | | | | | | | tells us whether Preprocessor::HandleIdentifier needs to be called. Because this method is only rarely needed, this saves a call and a bunch of random checks. This drops the time in HandleIdentifier from 3.52ms to .98ms on cocoa.h on my machine. llvm-svn: 62675
* Don't crash on empty PTH files. This fixes <rdar://problem/6512714>.Ted Kremenek2009-01-211-9/+19
| | | | llvm-svn: 62673
* really we only need on Read24!Chris Lattner2009-01-211-16/+0
| | | | llvm-svn: 62672
* revert my previous patch, it assumed endianness.Chris Lattner2009-01-211-6/+38
| | | | llvm-svn: 62671
OpenPOWER on IntegriCloud