summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PTHLexer.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Dont cast away const needlessly. Found by gcc48 -Wcast-qual.Roman Divacky2012-09-061-2/+2
| | | | llvm-svn: 163325
* Switch PTH format from a 7 byte magic number to an 8 byte one, to avoidRichard Smith2012-08-171-3/+3
| | | | | | misaligned reads throughout the file. Bump PTH format version to 10. llvm-svn: 162076
* Basic: import OwningPtr<> into clang namespaceDylan Noblesmith2012-02-051-3/+3
| | | | llvm-svn: 149798
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-251-3/+4
| | | | llvm-svn: 140478
* Simplify the last character check.David Blaikie2011-09-221-1/+1
| | | | llvm-svn: 140287
* Rename SourceLocation::getFileLocWithOffset -> getLocWithOffset.Argyrios Kyrtzidis2011-09-191-2/+2
| | | | | | It already works (and is useful with) macro locs as well. llvm-svn: 140057
* Support code-completion for C++ inline methods and ObjC buffering methods.Argyrios Kyrtzidis2011-09-041-1/+1
| | | | | | | | | | | | | | Previously we would cut off the source file buffer at the code-completion point; this impeded code-completion inside C++ inline methods and, recently, with buffering ObjC methods. Have the code-completion inserted into the source buffer so that it can be buffered along with a method body. When we actually hit the code-completion point the cut-off lexing or parsing. Fixes rdar://10056932&8319466 llvm-svn: 139086
* remove unneeded llvm:: namespace qualifiers on some core types now that ↵Chris Lattner2011-07-231-2/+2
| | | | | | | | LLVM.h imports them into the clang namespace. llvm-svn: 135852
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* Rename tok::eom to tok::eod.Peter Collingbourne2011-02-281-1/+1
| | | | | | | | 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
* MemoryBuffer API update.Michael J. Spencer2010-12-161-4/+2
| | | | llvm-svn: 121956
* Use error_code instead of std::string* for MemoryBuffer.Michael J. Spencer2010-12-091-1/+5
| | | | llvm-svn: 121378
* 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-3/+2
| | | | llvm-svn: 120038
* rework the stat cache, pulling it out of FileManager.h intoChris Lattner2010-11-231-13/+14
| | | | | | | its own header and giving it some more structure. No functionality change. llvm-svn: 120030
* don't allow remapping PTH file paths with -fworking-directory, theChris Lattner2010-11-231-3/+2
| | | | | | client should just pass in absolute paths. llvm-svn: 120012
* now the FileManager has a FileSystemOpts ivar, stop threadingChris Lattner2010-11-231-3/+1
| | | | | | | | | FileSystemOpts through a ton of apis, simplifying a lot of code. This also fixes a latent bug in ASTUnit where it would invoke methods on FileManager without creating one in some code paths in cindextext. llvm-svn: 120010
* tidy upChris Lattner2010-11-231-4/+4
| | | | llvm-svn: 119996
* Implement -working-directory.Argyrios Kyrtzidis2010-11-031-2/+4
| | | | | | | | | | | | | | | | | | | When -working-directory is passed in command line, file paths are resolved relative to the specified directory. This helps both when using libclang (where we can't require the user to actually change the working directory) and to help reproduce test cases when the reproduction work comes along. --FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains the working directory value if set). --FileSystemOptions are passed around to various interfaces that perform file operations. --Opening & reading the content of files should be done only through FileManager. This is useful in general since file operations will be abstracted in the future for the reproduction mechanism. FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same FileManager but with different FileSystemOptions. Addresses rdar://8583824. llvm-svn: 118203
* 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
OpenPOWER on IntegriCloud