summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. ThisChandler Carruth2011-04-231-0/+7
| | | | | | | | | | | | | | | | | | matches GCC behavior which libstdc++ uses to limit #warning-based messages about deprecation. The machinery involves threading this through a new '-fdeprecated-macro' flag for CC1. The flag defaults to "on", similarly to -Wdeprecated. We turn the flag off in the driver when the warning is turned off (modulo matching some GCC bugs). We record this as a language option, and key the preprocessor on the option when introducing the define. A separate flag rather than a '-D' flag allows us to properly represent the difference between C and C++ builds (only C++ receives the define), and it allows the specific behavior of following -Wdeprecated without potentially impacting the set of user-provided macro flags. llvm-svn: 130055
* There were some frustrating problems with the implementation ofChandler Carruth2011-04-231-2/+3
| | | | | | | | | | | | | | | | | | | | -Wwrite-strings. First and foremost, once the positive form of the flag was passed, it could never be disabled by passing -Wno-write-strings. Also, the diagnostic engine couldn't in turn use -Wwrite-strings to control diagnostics (as GCC does) because it was essentially hijacked to drive the language semantics. Fix this by giving CC1 a clean '-fconst-strings' flag to enable const-qualified strings in C and ObjC compilations. Corresponding '-fno-const-strings' is also added. Then the driver is taught to introduce '-fconst-strings' in the CC1 command when '-Wwrite-strings' dominates. This entire flag is basically GCC-bug-compatibility driven, so we also match GCC's bug where '-w' doesn't actually disable -Wwrite-strings. I'm open to changing this though as it seems insane. llvm-svn: 130051
* Add -fdelayed-template-parsing option. Using this option all templated ↵Francois Pichet2011-04-221-0/+6
| | | | | | | | | function definitions are parsed at the end of the translation unit only if it is required by an actual instantiation. As such all the symbols of the TU are available during name lookup. Using this flag is necessary for compatibility with Microsoft template code. This also provides some parsing speed improvement. llvm-svn: 130022
* Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (atNick Lewycky2011-04-211-0/+6
| | | | | | | | | compile time) and .gcda emission (at runtime). --coverage enables both. This does not yet add the profile_rt library to the link step if -fprofile-arcs is enabled when linking. llvm-svn: 129956
* Initial work to improve documentation for Clang's diagnostics, from Matthieu ↵Douglas Gregor2011-04-151-0/+3
| | | | | | Monrocq llvm-svn: 129614
* fix a bunch of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129559
* C1X: add a language standardPeter Collingbourne2011-04-151-0/+1
| | | | llvm-svn: 129553
* Fix a bunch of major problems with __unknown_anytype and properly testJohn McCall2011-04-091-0/+3
| | | | | | for them. The only major missing feature is references. llvm-svn: 129234
* accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,Chris Lattner2011-04-091-0/+1
| | | | | | per PR9577 llvm-svn: 129201
* Frontend: Sketch support for -diagnostic-log-file, which still doesn't do ↵Daniel Dunbar2011-04-071-0/+5
| | | | | | anything. llvm-svn: 129086
* Integrated-As: Support -Wa,-L when using the integrated assembler.Daniel Dunbar2011-03-281-0/+3
| | | | llvm-svn: 128433
* Flip the default for showing include stacks on notes to false. ThisChandler Carruth2011-03-271-4/+4
| | | | | | | | | | | | | required modifying a few tests that specifically use note include stacks to check the source manager's view of include stacks. I've simply added the flag to these tests for now, they may have to be more substantially changed if we decide to remove support for note include stacks altogether. Also, add a test for include stacks on notes that was supposed to go in with the previous commit. llvm-svn: 128390
* Add an option to suppress include stack printing on note diagnostics.Chandler Carruth2011-03-271-0/+7
| | | | | | | | | | | | | | | | | | These stacks are often less important than those on primary diagnostics. As the number of notes grows, this becomes increasingly important. The include stack printing is clever and doesn't print stacks for adjacent diagnostics from the same file, but when a note is in between a sequence of errors in a header file, and the notes all refer to some other file, we end up getting a worst-case ping-pong of include stacks that take up a great deal of vertical space. Still, for now, the default behavior isn't changed. We can evaluate user feedback with the flag. Patch by Richard Trieu, a couple of style tweaks from me. llvm-svn: 128371
* Frontend: Add a more explicit -backend-option flag for passing backend commandDaniel Dunbar2011-03-221-0/+5
| | | | | | | | line options, instead of leveraging the blanket -mllvm option. - This allows using the frontend itself without requiring the backend have those options available (i.e., if the target wasn't built). llvm-svn: 128087
* Add support for language-specific address spaces. On top of that,Peter Collingbourne2011-03-181-0/+3
| | | | | | | | | add support for the OpenCL __private, __local, __constant and __global address spaces, as well as the __read_only, _read_write and __write_only image access specifiers. Patch originally by ARM; language-specific address space support by myself. llvm-svn: 127915
* Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPLDaniel Dunbar2011-03-181-0/+3
| | | | | | comments. llvm-svn: 127910
* The Darwin kernel does not provide useful guard variable support.John McCall2011-03-181-0/+3
| | | | | | | | Issue this as an IR-gen error; it's not really worthwhile doing this "right", i.e. in Sema, because IR gen knows a lot of tricks beyond what the constant evaluator knows. llvm-svn: 127854
* Fix duplicate argument processingSandeep Patel2011-03-161-1/+1
| | | | llvm-svn: 127746
* Introduce '-chain-include' option to specify headers that will be converted ↵Argyrios Kyrtzidis2011-03-091-0/+10
| | | | | | | | | | to chained PCHs in memory without having to use multiple runs and intermediate files. Intended for testing & debugging of chained PCH. llvm-svn: 127339
* Remove the AST printer (-ast-print-xml), which is too incomplete andDouglas Gregor2011-03-071-3/+0
| | | | | | | | | | | | | | | too low-level to actually be useful but is just interesting enough for people to try to use it (which won't actually work beyond toy examples). To bring back the AST printer, it needs to be: - Complete, covering all of C/C++/Objective-C - Documented, with appropriate Schema against which we can validate the output - Designed for C/C++/Objective-C, not Clang's specific ASTs - Stable across Clang versions - Well-tested llvm-svn: 127141
* Implement -mrtd which sets the StdCall calling convention to be the defaultRoman Divacky2011-03-011-0/+1
| | | | | | one. llvm-svn: 126756
* [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best ↵Argyrios Kyrtzidis2011-02-281-17/+0
| | | | | | misnomer award. llvm-svn: 126676
* [analyzer] Migrate ArrayBoundCheckerV2 to CheckerV2.Argyrios Kyrtzidis2011-02-281-3/+0
| | | | | | Turns -analyzer-check-buffer-overflows into -analyzer-checker=core.experimental.Overflow llvm-svn: 126609
* [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.StatsArgyrios Kyrtzidis2011-02-281-3/+0
| | | | llvm-svn: 126608
* [analyzer] Remove '-analyzer-experimental-checks' flag.Argyrios Kyrtzidis2011-02-281-3/+0
| | | | llvm-svn: 126607
* Teach objc-rewriter to pass -fobjc-exceptions along.Fariborz Jahanian2011-02-251-1/+4
| | | | llvm-svn: 126497
* Intoduce '-analyzer-checker-help' flag which outputs a list of all available ↵Argyrios Kyrtzidis2011-02-251-0/+3
| | | | | | | | static analyzer checkers. This is pretty basic for now, eventually checkers should be grouped according to package, hidden checkers should be indicated etc. llvm-svn: 126454
* [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't ↵Argyrios Kyrtzidis2011-02-241-4/+0
| | | | | | have any checkers associated with it anymore. llvm-svn: 126440
* Allow passing a list of comma separated checker names to -analyzer-checker, e.g:Argyrios Kyrtzidis2011-02-241-2/+7
| | | | | | -analyzer-checker=cocoa,unix llvm-svn: 126372
* Add a -fcxx-exceptions flag to clang -cc1. This controls the newly added ↵Anders Carlsson2011-02-231-4/+7
| | | | | | CXXExceptions flag. llvm-svn: 126300
* Remove the storage for -cxx-system-include. Make libcxx toolchainJoerg Sonnenberger2011-02-221-5/+0
| | | | | | use -nostdinc++ and -cxx-isystem. llvm-svn: 126223
* Make clang -cc1 disable Objective-C exceptions by default, and add a ↵Anders Carlsson2011-02-221-2/+2
| | | | | | | | -fobjc-exceptions flag to turn them on. Update all tests accordingly. llvm-svn: 126177
* Bug#8945: Add -cxx-isystem option to specify C++ system directories.Joerg Sonnenberger2011-02-221-5/+8
| | | | | | | | | It works like -isystem and the search path keeps -isystem and -cxx-isystem in order relative to each other. -cxx-isystem is only used for C++ sources though. Drop the existing -cxx-system-include option for cc1 as it is now redundant. llvm-svn: 126167
* Add a new ObjCExceptions member variable to LangOptions. This controls ↵Anders Carlsson2011-02-191-2/+4
| | | | | | whether Objective-C exceptions are enabled or not (they are by default). llvm-svn: 126061
* Eliminate the internal command-line option for viewing inheritance in C++ ↵Douglas Gregor2011-02-171-8/+1
| | | | | | classes, since it's only really worked for the trivial cases anyway due to lame pseudo-parsing of the class name. The viewInheritance() function is still available for use in the debugger, where this is far more useful llvm-svn: 125762
* [analyzer] Use the new registration mechanism on the IdempotentOperationChecker.Argyrios Kyrtzidis2011-02-151-3/+0
| | | | llvm-svn: 125611
* [analyzer] Overhauling of the checker registration mechanism.Argyrios Kyrtzidis2011-02-141-3/+20
| | | | | | | | | | | | | | -Checkers will be defined in the tablegen file 'Checkers.td'. -Apart from checkers, we can define checker "packages" that will contain a collection of checkers. -Checkers can be enabled with -analyzer-checker=<name> and disabled with -analyzer-disable-checker=<name> e.g: Enable checkers from 'cocoa' and 'corefoundation' packages except the self-initialization checker: -analyzer-checker=cocoa -analyzer-checker=corefoundation -analyzer-disable-checker=cocoa.SelfInit -Introduces CheckerManager and CheckerProvider. CheckerProviders get the set of checker names to enable/disable and register them with the CheckerManager which will be the entry point for all checker-related functionality. Currently only the self-initialization checker takes advantage of the new mechanism. llvm-svn: 125503
* OpenCL: add support for __kernel, kernel keywords and EXTENSION,Peter Collingbourne2011-02-141-0/+1
| | | | | | FP_CONTRACT pragmas. Patch originally by ARM. llvm-svn: 125475
* Implement mcount profiling, enabled via -pg.Roman Divacky2011-02-101-0/+1
| | | | llvm-svn: 125282
* Driver/Frontend: Wire up -mregparm=.Daniel Dunbar2011-02-091-0/+5
| | | | llvm-svn: 125201
* static analyzer: Further reduce the analyzer's memory usage when analyzing ↵Ted Kremenek2011-02-091-0/+1
| | | | | | | | | | | | sqlite3 by 7-10% by recylcing "uninteresting" ExplodedNodes. The optimization involves eagerly pruning ExplodedNodes from the ExplodedGraph that contain practically no difference between the predecessor and successor nodes. For example, if the state is different between a predecessor and a node, the node is left in. Only for the 'environment' component of the state do we not care if the ExplodedNodes are different. This paves the way for future optimizations where we can reclaim the environment objects. llvm-svn: 125154
* -fapple-kext cannot have 'weak' visibility in thisFariborz Jahanian2011-02-041-2/+7
| | | | | | abi. llvm-svn: 124834
* Frontend: Add -header-include-file option, for allowing saving header includeDaniel Dunbar2011-02-021-0/+5
| | | | | | information to a file. llvm-svn: 124750
* Frontend: Factor out header include dumping (-H) into its own preprocessorDaniel Dunbar2011-02-021-3/+3
| | | | | | | | callbacks class. - Aside from being generally cleaner, this also allows -H to work correctly in modes other than standard preprocessing (e.g., -c, -MM, etc.) llvm-svn: 124723
* Basic support for -mms-bitfields, from Carl Norum!Douglas Gregor2011-02-011-0/+3
| | | | llvm-svn: 124661
* Support for -plugin-arg- with -add-pluginNico Weber2011-01-291-0/+12
| | | | llvm-svn: 124551
* [analyzer] Enable the self-init checker under command-line option ↵Argyrios Kyrtzidis2011-01-261-0/+3
| | | | | | | | '-analyzer-check-objc-self-init' which by default is enabled by the driver for '--analyze'. llvm-svn: 124266
* Add -add-plugin flag, which runs plugins in addition to codegen.Nico Weber2011-01-251-0/+6
| | | | llvm-svn: 124227
* Add all options needed to support -fapple-kext. wip.Fariborz Jahanian2011-01-071-1/+6
| | | | llvm-svn: 122987
* Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.Fariborz Jahanian2011-01-041-4/+3
| | | | | | // rdar://8818375 llvm-svn: 122831
OpenPOWER on IntegriCloud