summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic
Commit message (Collapse)AuthorAgeFilesLines
* add clang -cc1 level support for "-ferror-limit 42"Chris Lattner2010-04-071-2/+2
| | | | llvm-svn: 100687
* add capabilities to stop emitting errors after some limit.Chris Lattner2010-04-071-0/+7
| | | | | | Right now the limit is 0 (aka disabled) llvm-svn: 100684
* Instead of counting totally diagnostics, split the count into a countChris Lattner2010-04-071-2/+5
| | | | | | | | | | | | | | | of errors and warnings. This allows us to emit something like this: 2 warnings and 1 error generated. instead of: 3 diagnostics generated. This also stops counting 'notes' because they are just follow-on information about the previous diag, not a diagnostic in themselves. llvm-svn: 100675
* Add option and macro definition for AES instructions. Now produces realEric Christopher2010-04-021-2/+20
| | | | | | assembly for testcases. llvm-svn: 100253
* Reinstate my CodeModificationHint -> FixItHint renaming patch, withoutDouglas Gregor2010-03-311-5/+5
| | | | | | the C-only "optimization". llvm-svn: 100022
* Revert r100008, which inexplicably breaks the clang-i686-darwin10 builderDouglas Gregor2010-03-311-5/+5
| | | | llvm-svn: 100018
* Rename CodeModificationHint to FixItHint, since we've been using theDouglas Gregor2010-03-311-5/+5
| | | | | | | term "fix-it" everywhere and even *I* get tired of long names sometimes. No functionality change. llvm-svn: 100008
* Optimize PartialDiagnostic's memory-allocation behavior by placing aDouglas Gregor2010-03-291-0/+11
| | | | | | | | | | | | | | cache of PartialDiagnostic::Storage objects into an allocator within the ASTContext. This eliminates a significant amount of malloc traffic, for a 10% performance improvement in -fsyntax-only wall-clock time with 403.gcc's combine.c. Also, eliminate the RequireNonAbstractType hack I put in earlier, which was but a symptom of this larger problem. Fixes <rdar://problem/7806091>. llvm-svn: 99849
* Teach the diagnostic engine to provide more detailed information aboutDouglas Gregor2010-03-251-4/+14
| | | | | | | | | how to handle a diagnostic during template argument deduction, which may be "substitution failure", "suppress", or "report". This keeps us from, e.g., emitting warnings while performing template argument deduction. llvm-svn: 99560
* PS3 needs __PPC__. Should this be in the PPC target?John Thompson2010-03-251-0/+1
| | | | llvm-svn: 99513
* Fix a thinko and a typo in the delayed-diagnostic code.Douglas Gregor2010-03-221-3/+4
| | | | llvm-svn: 99178
* Introduce the notion of a single "delayed" diagnostic into theDouglas Gregor2010-03-222-3/+61
| | | | | | | | | | | | Diagnostic subsystem, which is used in the rare case where we find a serious problem (i.e., an inconsistency in the file system) while we're busy formatting another diagnostic. In this case, the delayed diagnostic will be emitted after we're done with the other diagnostic. This is only to be used for fatal conditions detected at very inconvenient times, where we can neither stop the current diagnostic in flight nor can we suppress the second error. llvm-svn: 99175
* Keep track of the size/modification time of each file source-locationDouglas Gregor2010-03-211-2/+1
| | | | | | | entry in a precompiled header, so that we can detect modified files even when we miss in the stat cache. llvm-svn: 99149
* Fix a longstanding (but previously unknown) bug in the lazyDouglas Gregor2010-03-191-1/+1
| | | | | | | | | | | | | deserialization of precompiled headers, where the deserialization of the source location entry for a buffer (e.g., macro instantiation scratch space) would overwrite a one-element FileID cache in the source manager. When tickled at the wrong time, we would return the wrong decomposed source location and eventually cause c-index-test to crash. Found by dumb luck. It's amazing this hasn't shown up before. llvm-svn: 98940
* Check the inode in addition to size and modification time to determineDouglas Gregor2010-03-171-3/+5
| | | | | | whether a file has changed since it was originally read. llvm-svn: 98726
* Use a simple diagnostic (file modified) when we detect that a file hasDouglas Gregor2010-03-171-10/+4
| | | | | | | changed, rather than trying to point out how it changed. The "why" doesn't matter. llvm-svn: 98725
* Teach SourceManager's content cache to keep track of whether itsDouglas Gregor2010-03-161-21/+24
| | | | | | | | | buffer was invalid when it was created, and use that bit to always set the "Invalid" flag according to whether the buffer is invalid. This ensures that all accesses to an invalid buffer are marked invalid, improving recovery. llvm-svn: 98690
* Update get*LineNumber() and get*ColumnNumber() functions to pass theDouglas Gregor2010-03-161-8/+8
| | | | | | | Invalid bit through; there are no safety-critical callers of these functions. llvm-svn: 98674
* Audit all callers of SourceManager::getCharacterData(); update some ofDouglas Gregor2010-03-161-2/+2
| | | | | | them to recover more gracefully on failure. llvm-svn: 98672
* Audit all getBuffer() callers (for both the FullSourceLoc andDouglas Gregor2010-03-162-11/+10
| | | | | | | SourceManager versions), updating those callers that need to recover gracefully from failure. llvm-svn: 98665
* Switch another function to StringRef instead of char pointer pairs.Benjamin Kramer2010-03-161-3/+2
| | | | llvm-svn: 98631
* Let SourceManager::getBufferData return StringRef instead of a pair of two ↵Benjamin Kramer2010-03-161-5/+3
| | | | | | const char*. llvm-svn: 98630
* Introduce optional "Invalid" parameters to routines that invoke theDouglas Gregor2010-03-161-25/+57
| | | | | | | | | | | | | SourceManager's getBuffer() and, therefore, could fail, along with Preprocessor::getSpelling(). Use the Invalid parameters in the literal parsers (string, floating point, integral, character) to make them robust against errors that stem from, e.g., PCH files that are not consistent with the underlying file system. I still need to audit every use caller to all of these routines, to determine which ones need specific handling of error conditions. llvm-svn: 98608
* Use SourceManager's Diagnostic object for all file-reading errors,Douglas Gregor2010-03-161-90/+33
| | | | | | simplifying the SourceManager interfaces somewhat. llvm-svn: 98598
* Give SourceManager a Diagnostic object with which to report errors,Douglas Gregor2010-03-161-13/+12
| | | | | | and start simplifying the interfaces in SourceManager that can fail. llvm-svn: 98594
* Add some <cstdio> includes to unbreak the buildbotsDouglas Gregor2010-03-151-0/+1
| | | | llvm-svn: 98591
* Introduce a new BufferResult class to act as the return type ofDouglas Gregor2010-03-151-11/+104
| | | | | | | | | | | | | | SourceManager's getBuffer() (and similar) operations. This abstract can be used to force callers to cope with errors in getBuffer(), such as missing files and changed files. Fix a bunch of callers to use the new interface. Add some very basic checks for file consistency (file size, modification time) into ContentCache::getBuffer(), although these checks don't help much until we've updated the main callers (e.g., SourceManager::getSpelling()). llvm-svn: 98585
* Reintroduce r98340 and r98341 now without copy/paste errors.Kovarththanan Rajaratnam2010-03-121-14/+15
| | | | | | Thanks to Ben for pointing this out. llvm-svn: 98345
* Back out r98340 abd r98341Kovarththanan Rajaratnam2010-03-121-15/+14
| | | | llvm-svn: 98344
* fix PR6584: __SSE3__ not defined with -mss3Nuno Lopes2010-03-121-0/+1
| | | | llvm-svn: 98342
* Switch parameter order for consistency (no functionality change)Kovarththanan Rajaratnam2010-03-121-4/+4
| | | | llvm-svn: 98341
* Add keywords using StringRefKovarththanan Rajaratnam2010-03-121-13/+14
| | | | llvm-svn: 98340
* Fix -Wsign-compare warning reported by clang++.Ted Kremenek2010-03-101-1/+2
| | | | llvm-svn: 98170
* add mblaze target support, patch by Wesley Peck!Chris Lattner2010-03-061-0/+131
| | | | llvm-svn: 97890
* Make sure the raw_string_ostream gets flushed so we don't accidentally ↵Benjamin Kramer2010-03-051-3/+3
| | | | | | return an empty string. llvm-svn: 97809
* add TCE target support, patch by Pekka J!Chris Lattner2010-03-041-3/+4
| | | | llvm-svn: 97746
* Add in disabled case as well.Eric Christopher2010-03-041-0/+4
| | | | llvm-svn: 97716
* Add in -msse4.1 and -msse4.2 options and continuing a ratherEric Christopher2010-03-041-3/+8
| | | | | | | hacky solution for translating. Expanded on comment explaining the hack a bit. llvm-svn: 97714
* add framework for ARM builtins, Patch by Edmund Grimley Evans!Chris Lattner2010-03-031-3/+10
| | | | llvm-svn: 97656
* Use SVN_REVISION, not SVN_VERSION.Ted Kremenek2010-03-031-1/+1
| | | | llvm-svn: 97625
* Make getClangRevision() check that SVN_VERSION is an empty string Ted Kremenek2010-03-031-8/+8
| | | | | | | | (even if it is defined). This fixes the issue of this function returning '0' when SVN_VERSION is defined to be "". Fixes: <rdar://problem/7663667> llvm-svn: 97620
* Add in some more MIPS command line options.Eric Christopher2010-03-021-1/+29
| | | | | | Patch by Oleksandr Tymoshenko! llvm-svn: 97544
* Robustify SourceManager::getLocation(), so that it returns anDouglas Gregor2010-02-271-14/+18
| | | | | | | | | end-of-line source location when given a column number beyond the length of the line, or an end-of-file source location when given a line number beyond the length of the file. Previously, we would return an invalid location. llvm-svn: 97299
* Use a little binary header in serialized diagnostics to help the ↵Douglas Gregor2010-02-191-3/+26
| | | | | | deserializer skip over noise in the stream llvm-svn: 96641
* Re-apply my diagnostics-capture patch for CIndex, with some tweaks toDouglas Gregor2010-02-181-1/+1
| | | | | | try to address the msvc failures. llvm-svn: 96624
* Rework how CIndex handles diagnostics. Rather than using a callback,Douglas Gregor2010-02-181-142/+168
| | | | | | | | | | | | | | | | | | we attach diagnostics to translation units and code-completion results, so they can be queried at any time. To facilitate this, the new StoredDiagnostic class stores a diagnostic in a serializable/deserializable form, and ASTUnit knows how to capture diagnostics in this stored form. CIndex's CXDiagnostic is a thin wrapper around StoredDiagnostic, providing a C interface to stored or de-serialized diagnostics. I've XFAIL'd one test case temporarily, because currently we end up storing diagnostics in an ASTUnit that's never returned to the user (because it contains errors). I'll introduce a temporary fix for this soon; the real fix will be to allow us to return and query invalid ASTs. llvm-svn: 96592
* add freebsd/ppc[64] support, patch by Nathan Whitehorn, PR6318Chris Lattner2010-02-161-1/+10
| | | | llvm-svn: 96362
* Re-applying 96173. Looks like finally I got the test case right.Sanjiv Gupta2010-02-161-5/+7
| | | | llvm-svn: 96321
* reverting back 96242 as it still causes a test failure.Sanjiv Gupta2010-02-151-7/+5
| | | | llvm-svn: 96244
* Re-applying 96173 with corresponding changes in test.Sanjiv Gupta2010-02-151-5/+7
| | | | llvm-svn: 96242
OpenPOWER on IntegriCloud