summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
Commit message (Collapse)AuthorAgeFilesLines
* Driver & AST: Implement support for -fpack-struct and -fpack-struct= commandDaniel Dunbar2011-10-051-0/+1
| | | | | | | line options. - <rdar://problem/10120602>, PR9631 llvm-svn: 141211
* Seriously ugly hack, part 2Douglas Gregor2011-10-051-1/+7
| | | | llvm-svn: 141181
* Seriously ugly hack to try to get the Windows builders back onlineDouglas Gregor2011-10-051-2/+15
| | | | llvm-svn: 141180
* Introduce a simple file-based locking protocol for on-demand moduleDouglas Gregor2011-10-051-0/+259
| | | | | | | | | | | creation, so that only a single Clang instance will rebuild a given module at once (and the others will wait). We still don't clean up the lock files when we crash, which is a rather unfortunate problem. I'll handle that next, and there is certainly a *lot* of room for further improvements. llvm-svn: 141179
* Fix include path detection on Fedora 15 with GCC 4.6.1. Patch by Arthur Haas.Justin Holewinski2011-10-041-1/+6
| | | | llvm-svn: 141086
* Rip out flags for controlling C++ "production mode" separately.Bob Wilson2011-10-041-1/+1
| | | | | | | This is old leftover cruft from the days when C++ was not yet ready for prime time. llvm-svn: 141063
* When build a module on demand, run the module-building job on aDouglas Gregor2011-10-041-3/+21
| | | | | | | separate thread with the "suitably large" stack, so we don't blow the stack when building modules recursively. llvm-svn: 141051
* Make -fobjc-nonfragile-abi the -cc1 default, since it's theJohn McCall2011-10-021-6/+4
| | | | | | | | | | | | | | | | | | | increasingly prevailing case to the point that new features like ARC don't even support the fragile ABI anymore. This required a little bit of reshuffling with exceptions because a check was assuming that ObjCNonFragileABI was only being set in ObjC mode, and that's actually a bit obnoxious to do. Most, though, it involved a perl script to translate a ton of test cases. Mostly no functionality change for driver users, although there are corner cases with disabling language-specific exceptions that we should handle more correctly now. llvm-svn: 140957
* [analyzer] Add -analyzer-purge option which can take on multiple values, ↵Anna Zaks2011-09-301-3/+29
| | | | | | remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.) llvm-svn: 140838
* Basic/Diagnostics: Add an isDefaultMappingAsError method, and switch ↵Daniel Dunbar2011-09-291-9/+13
| | | | | | | | TextDiagnosticPrinter to use that instead of extracting the current mapping via getDiagnosticLevel, which fixes one class of corner cases w.r.t. printing the "-Werror" diagnostic option marker. - The TextDiagnosticPrinter code is still fragile as it is just "reverse engineering" what the diagnostic engine is doing. Not my current priority to fix though. llvm-svn: 140752
* Basic/Diagnostic: Factor outDaniel Dunbar2011-09-291-14/+22
| | | | | | | | | DiagnosticsEngine::setDiagnosticGroup{ErrorAsFatal,WarningAsError} methods which more accurately model the correct API -- no internal change to the diagnostics engine yet though. - Also, stop honoring -Werror=everything (etc.) as a valid (but oddly behaved) option. llvm-svn: 140747
* Introduce an opt-in warning when a module is being implicitly builtDouglas Gregor2011-09-291-0/+2
| | | | | | from sources. llvm-svn: 140746
* Introduce a pure virtual clone() method to DiagnosticConsumer, so thatDouglas Gregor2011-09-296-13/+42
| | | | | | | | | we have the ability to create a new, distict diagnostic consumer when we go off and build a module. This avoids the currently horribleness where the same diagnostic consumer sees diagnostics for multiple translation units (and multiple SourceManagers!) causing all sorts of havok. llvm-svn: 140743
* [driver] Add basic support for escaping XML characters in CC_LOG_DIAGNOSTICSChad Rosier2011-09-281-5/+30
| | | | | | | strings. rdar://9696709 llvm-svn: 140732
* Remove the egregious hack that made Objective-C++ ARC work with olderDouglas Gregor2011-09-271-70/+1
| | | | | | | versions of libc++. Newer versions of libc++ know how to deal with ARC properly. Fixes <rdar://problem/10062179>. llvm-svn: 140651
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-271-1/+1
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* Add back support for a manually formatted section of the diagnosticChandler Carruth2011-09-261-1/+4
| | | | | | | | | | | message. Specifically, we now only line-wrap the first line of te diagnostic message and assume the remainder is manually formatted. While adding it back, simplify the logic for doing this. Finally, add a test that ensures we actually preserve this feature. =D *Now* its not dead code. Thanks to Doug for the test case. llvm-svn: 140538
* Hoist and beef up the asserts about the level of infrastructure expectedChandler Carruth2011-09-261-5/+10
| | | | | | | | | | | | | | | | | when working with a diagnostic attached to a source location. Also comment more thoroughly why its important to handle non-location diagnostic messages separately. Finally, hoist the creation of the TextDiagnostic object up to the beginning of the location-based diagnostics. This paves the way for sinking more and more of the logic into this class. When everything below this constructor is sunk into the TextDiagnostic class it should be sufficiently "feature complete" to accomplish my two goals: 1) Have the printing of a macro expansion note use the exact same code as any other note. 2) Be able to implement clang_formatDiagnostic in terms of this class. llvm-svn: 140526
* Switch the emission of diagnostics without a source location toChandler Carruth2011-09-261-22/+32
| | | | | | | | | | | | | | | | | | | | | a dedicated path. The logic for such diagnostics is much simpler than for others. This begins to make an important separation in this routine. We expect most (and most interesting) textual diagnostics to be made in the presence of at least *some* source locations and a source manager. However the DiagnosticConsumer must be prepared to diagnose errors even when the source manager doesn't (yet) exist or when there is no location information at all. In order to sink more and more logic into the TextDiagnostic class while minimizing its complexity, my plan is to force the DiagnosticConsumer to special case diagnosing any locationless messages and then hand the rest to the TextDiagnostic class. I'd appreciate any comments on this design. It requires a bit of code duplication in order to keep interfaces simple. Alternatively, if we really need TextDiagnostic to be capable of handling diagnostics even in the absence of a viable SourceManager, then this split isn't necessary. llvm-svn: 140525
* Extract the actual printing of the message string into a helperChandler Carruth2011-09-261-32/+33
| | | | | | | | | function. Doing this conveniently requires moving the word wrapping to use a StringRef which seems generally an improvement. There is a lot that could be simplified in the word wrapping by using StringRef that I haven't looked at yet... llvm-svn: 140524
* Group the helpers for word wrapping with the primary routine. NoChandler Carruth2011-09-261-92/+92
| | | | | | functionality changed. llvm-svn: 140523
* Don't map a file:line:col triplet that is inside the preamble range toArgyrios Kyrtzidis2011-09-261-12/+44
| | | | | | | | | | | | | | a "loaded" location of the precompiled preamble. Instead, handle specially locations of preprocessed entities: -When looking up for preprocessed entities, map main file locations inside the preamble range to a preamble loaded location. -When getting the source range of a preprocessing cursor, map preamble loaded locations back to main file locations. Fixes rdar://10175093 & http://llvm.org/PR10999 llvm-svn: 140519
* Don't print a stray ] at the end of diagnostics.Benjamin Kramer2011-09-261-3/+4
| | | | | | Also remove an obsolete utostr call. llvm-svn: 140511
* Remove support for splitting word-wrapped diagnostic messages on newlineChandler Carruth2011-09-261-18/+2
| | | | | | | | | | | | characters. I could find no newline character in a diagnostic message, and adding an assert to this code never fires in the testsuite. I think this code is essentially dead, and was previously used for a different purpose. If I just don't understand how it is we can end up with a newline here please let me know (with a test case?) and I'll revert. llvm-svn: 140497
* Move the word wrapped printing routine down to all the other helperChandler Carruth2011-09-261-82/+77
| | | | | | | printing routines, clean up its doxyments and switch it to a camelCase name as well. No functionality changed here. llvm-svn: 140496
* Switch some of my recently added helper functions to use the properChandler Carruth2011-09-261-6/+19
| | | | | | style, and add doxyments. llvm-svn: 140495
* Rewrite the printing of diagnostic options, categories, etc to actuallyChandler Carruth2011-09-261-35/+29
| | | | | | use the ostream interface and avoid lots of temporary strings. llvm-svn: 140494
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-265-9/+9
| | | | llvm-svn: 140493
* Delete an extraneous line I missed.Chandler Carruth2011-09-261-1/+0
| | | | llvm-svn: 140491
* A direct extraction of the rest of the option printing into a helper.Chandler Carruth2011-09-261-51/+57
| | | | | | This needs to be cleaned up to better use the ostream object, WIP. llvm-svn: 140490
* Rename VerifyDiagnosticsClient to VerifyDiagnosticConsumer as per issue 5397David Blaikie2011-09-263-11/+11
| | | | llvm-svn: 140489
* Start a more correct pattern for factoring out the name printing. SlowlyChandler Carruth2011-09-261-7/+10
| | | | | | | I'm planning to switch a bunch of these over to use a raw_ostream instead of += on a string object. llvm-svn: 140488
* Revert r140484. That was *not* ready to be committed! Only halfway done,Chandler Carruth2011-09-261-39/+34
| | | | | | | | and completely broken at that. Sorry, must remember to stash rather than commit. =] llvm-svn: 140487
* Fix a formatting goof.Chandler Carruth2011-09-261-1/+1
| | | | llvm-svn: 140486
* Rename ChainedDiagnosticClient to ChainedDiagnosticConsumer as per issue 5397David Blaikie2011-09-261-3/+3
| | | | llvm-svn: 140485
* Extract the diagnostic message formatting into a helper routine.Chandler Carruth2011-09-261-34/+39
| | | | llvm-svn: 140484
* Rename StoredDiagnosticClient to StoredDiagnosticConsumer as per issue 5397David Blaikie2011-09-261-6/+6
| | | | llvm-svn: 140483
* Extract the logic for printing a colorful level name into a helperChandler Carruth2011-09-251-21/+28
| | | | | | function. llvm-svn: 140481
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397David Blaikie2011-09-256-15/+15
| | | | llvm-svn: 140479
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-2512-91/+96
| | | | llvm-svn: 140478
* Inline this method now that its completely trivial, and prepare forChandler Carruth2011-09-251-18/+9
| | | | | | hoisting parts of the text diagnostic. llvm-svn: 140477
* Shuffle some names around. 'CaretDiagnostic' is inaccurate as this needsChandler Carruth2011-09-251-18/+21
| | | | | | | to handle non-caret diagnostics as well in order to be fully useful in libclang etc. Also sketch out some more of my plans on this refactoring. llvm-svn: 140476
* Actually remove the members of CaretDiagnostic no longer in use forChandler Carruth2011-09-251-10/+6
| | | | | | | | tracking the start and stop of macro expansion suppression. Also remove the Columns variable which was just a convenience variable based on DiagOpts. Instead we materialize it in the one piece of code that cared. llvm-svn: 140475
* Sink the logic for suppressing some macro expansion notes from theChandler Carruth2011-09-251-41/+29
| | | | | | | | | | | | | | | | TextDiagnosticPrinter into the CaretDiagnostic class. Several interesting results from this: - This removes a significant per-diagnostic bit of state from the CaretDiagnostic class, which should eventually allow us to re-use the object. - It removes a redundant recursive walk of the macro expansion stack just to compute the depth. We don't need the depth until we're unwinding anyways, so we can just mark when we reach it. - It also paves the way for several simplifications we can do to how we implement the suppression. llvm-svn: 140474
* Split the recursive macro expansion walk out from the routine whichChandler Carruth2011-09-251-58/+71
| | | | | | emits a source snippet and caret line. llvm-svn: 140467
* Don't translate CRLF files into LF files. Fixes PR6870, from Aaron Ballman!Douglas Gregor2011-09-231-2/+43
| | | | llvm-svn: 140435
* More missing header inclusions from llvm_unreachable migration.David Blaikie2011-09-232-0/+2
| | | | llvm-svn: 140369
* Switch assert(0/false) llvm_unreachable.David Blaikie2011-09-234-7/+8
| | | | llvm-svn: 140367
* Reenable -cxx-isystem for Objective C++, until I come up with a better solutionBenjamin Kramer2011-09-231-1/+1
| | | | llvm-svn: 140365
* Add support for CPATH and friends.Benjamin Kramer2011-09-222-63/+35
| | | | | | | | | | | | This moves the existing code for CPATH into the driver and adds the environment lookup and path splitting there. The paths are then passed down to cc1 with -I options (CPATH), added after the normal user-specified include dirs. Language specific paths are passed via -LANG-isystem and the actual filtering is performed in the frontend. I tried to match GCC's behavior as close as possible Fixes PR8971. llvm-svn: 140341
OpenPOWER on IntegriCloud