summaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Implement support for -fwrapv, rdar://7221421Chris Lattner2010-06-261-4/+10
| | | | | | | | | | | | | | As part of this, pull together trapv handling into the same enum. This also add support for NSW multiplies. This also makes PCH disagreement on overflow behavior silent, since it really doesn't matter except for warnings and codegen (no macros get defined etc). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106956 91177308-0d34-0410-b5e6-96231b3b80d8
* implement support for -finstrument-functions, patch by NelsonChris Lattner2010-06-221-0/+2
| | | | | | | Elhage! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy ↵Daniel Dunbar2010-06-161-1/+13
| | | | | | Straszheim! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>Douglas Gregor2010-06-151-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Fix arg_iterator typing to reflect that it is really an iterator ↵Daniel Dunbar2010-06-111-19/+22
| | | | | | over Arg*s. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105838 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option -fshow-overloads=best|all to limit the number of overloadJeffrey Yasskin2010-06-111-1/+12
| | | | | | | | candidates printed. We default to 'all'. At the moment, 'best' prints only the first 4 overloads, but we'll improve that over time. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105815 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to specify the target C++ ABI to the frontend. Use it toCharles Davis2010-06-111-0/+7
| | | | | | | select either the default Itanium ABI or the new, experimental Microsoft ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105804 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Fix crashes on error paths.Daniel Dunbar2010-06-091-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105759 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Add FrontendAction support for handling LLVM IR inputs.Daniel Dunbar2010-06-071-1/+4
| | | | | | - These inputs follow an abbreviated execution path, but are still worth handling by FrontendAction so they reuse all the other clang -cc1 features. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105582 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Lift InputKind enumeration to top level.Daniel Dunbar2010-06-071-60/+58
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105577 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions ↵Daniel Dunbar2010-06-071-0/+2
| | | | | | argument to BackendConsumer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105574 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all ↵Daniel Dunbar2010-05-271-0/+3
| | | | | | instructions when using -integrated-as. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104807 91177308-0d34-0410-b5e6-96231b3b80d8
* Only enable code patterns (e.g., try { statements } catch (...) {Douglas Gregor2010-05-251-0/+4
| | | | | | | statements }) in the code-completion results if explicitly requested. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104637 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not theDaniel Dunbar2010-05-251-0/+3
| | | | | | .s printer or .o writer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver: Move some argument lookup utilities into driver::ArgList.Daniel Dunbar2010-05-201-72/+43
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104237 91177308-0d34-0410-b5e6-96231b3b80d8
* Add option '-analyzer-max-loop', which specifies the maximum Zhongxing Xu2010-05-181-0/+1
| | | | | | | number of times the analyzer will go through a loop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104007 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a stub frontend action for BoostCon, for next week's workshop.Douglas Gregor2010-05-071-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
* Make -analyzer-inline-call not a separate analysis. Instead it's a boolean Zhongxing Xu2010-05-061-0/+1
| | | | | | | | flag now, and can be used with other analyses. Only turned it on for C++ methods for now. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103160 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new -fdiagnostics-show-category=none/id/name option, giving controlChris Lattner2010-05-041-0/+18
| | | | | | | | | | | | | over choice of: t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat] t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,1] t.c:3:11: warning: conversion specifies type 'char *' but the argument has type 'int' [-Wformat,Format String] dox to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103056 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a limit on the depth of the macro instantiation backtraceDouglas Gregor2010-05-041-2/+13
| | | | | | | | | | | | | | | | printed in a diagnostic, similar to the limit we already have on the depth of the template instantiation backtrace. The macro instantiation backtrace is limited to 10 "instantiated from:" diagnostics; when it's longer than that, we'll show the first half, then say how many were suppressed, then show the second half. The limit can be changed with -fmacro-instantiation-limit=N, and turned off with N=0. This eliminates a lot of note spew with libraries making use of the Boost.Preprocess library. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103014 91177308-0d34-0410-b5e6-96231b3b80d8
* Bump default template instantiation depth to 1024, as required by C++0xDouglas Gregor2010-05-011-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102847 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,Daniel Dunbar2010-04-291-1/+0
| | | | | | instead of NDEBUG. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102622 91177308-0d34-0410-b5e6-96231b3b80d8
* NeXT: Clean up dispatch method policy selection.Daniel Dunbar2010-04-241-3/+23
| | | | | | | | | | - Replace -cc1 level -fobjc-legacy-dispatch with -fobjc-dispatch-method={legacy,non-legacy,mixed}. - Lift "mixed" vs "non-mixed" policy choice up to driver level, instead of being buried in CGObjCMac.cpp. - No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102255 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach clang -fixit to modify files in-place, or -fixit=suffix to create newNick Lewycky2010-04-241-20/+3
| | | | | | | files with the additional suffix in the middle. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102230 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for -fno-constant-cfstrings option - wip.Fariborz Jahanian2010-04-221-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a limit on the depth of the template instantiation backtraceDouglas Gregor2010-04-201-0/+7
| | | | | | | | | | | | | | | | | we will print with each error that occurs during template instantiation. When the backtrace is longer than that, we will print N/2 of the innermost backtrace entries and N/2 of the outermost backtrace entries, then skip the middle entries with a note such as: note: suppressed 2 template instantiation contexts; use -ftemplate-backtrace-limit=N to change the number of template instantiation entries shown This should eliminate some excessively long backtraces that aren't providing any value. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101882 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are notChandler Carruth2010-04-171-0/+12
| | | | | | | | | implemented precisely the same as GCC, but the distinction GCC makes isn't useful to represent. This allows parsing code which uses GCC-specific keywords ('asm', etc.) without parsing in a fully GNU mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101667 91177308-0d34-0410-b5e6-96231b3b80d8
* Vtable -> VTable renames across the board.Anders Carlsson2010-04-171-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.Daniel Dunbar2010-04-151-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101370 91177308-0d34-0410-b5e6-96231b3b80d8
* Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM ↵Daniel Dunbar2010-04-151-0/+5
| | | | | | | | option parser. - Note that this is a behavior change, previously -mllvm at the driver level forwarded to clang -cc1. The driver does a little magic to make sure that '-mllvm -disable-llvm-optzns' works correctly, but other users will need to be updated to use -Xclang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101354 91177308-0d34-0410-b5e6-96231b3b80d8
* implement altivec.h and a bunch of support code, patch by Anton Yartsev!Chris Lattner2010-04-141-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a cc1 option to specify the max number of nodes the analyzer can explore.Zhongxing Xu2010-04-131-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101120 91177308-0d34-0410-b5e6-96231b3b80d8
* add frontend support for -fdata-sections and -ffunction-sections,Chris Lattner2010-04-131-0/+7
| | | | | | | patch by Sylvere Teissier! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename -dump-record-layouts to -fdump-record-layouts now that the option ↵Anders Carlsson2010-04-101-1/+1
| | | | | | behaves like aa flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100943 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn access control on by default in -cc1.John McCall2010-04-091-4/+3
| | | | | | | | | | Remove -faccess-control from -cc1; add -fno-access-control. Make the driver pass -fno-access-control by default. Update a bunch of tests to be correct under access control. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100880 91177308-0d34-0410-b5e6-96231b3b80d8
* Fronted: Kill overly specialized RecordLayoutDumper, just make ↵Daniel Dunbar2010-04-081-3/+1
| | | | | | -dump-record-layouts a bit that Sema honors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100747 91177308-0d34-0410-b5e6-96231b3b80d8
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-071-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100708 91177308-0d34-0410-b5e6-96231b3b80d8
* add clang -cc1 level support for "-ferror-limit 42"Chris Lattner2010-04-071-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100687 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement support for -nostdc++. Fixes PR6446.Douglas Gregor2010-03-241-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
* C++: Add support for -fno-use-cxa-atexit.Daniel Dunbar2010-03-201-3/+6
| | | | | | | | - So much typing, so little gain... Also, rename the __cxx_global_initialization function just to match llvm-gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99039 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Kill off -empty-input only, and replace with -init-only which is anDaniel Dunbar2010-03-191-3/+3
| | | | | | | | actual action. - This is easier to use, and more reliable for timing the thing this was actually meant to be useful for. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98978 91177308-0d34-0410-b5e6-96231b3b80d8
* Optionally store a PreprocessingRecord in the preprocessor itself, andDouglas Gregor2010-03-191-1/+3
| | | | | | | tie its creation to a CC1 flag -detailed-preprocessing-record. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98963 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.John McCall2010-03-151-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-introduce the ctor/dtor alias optimization, this time hidden behind aJohn McCall2010-02-191-0/+3
| | | | | | | | command-line option which defaults off. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
* Raise the responsibility for passing -disable-llvm-verifier in NDEBUG buildsJohn McCall2010-02-131-6/+2
| | | | | | | | | to the driver, and support it in CodeGenOptsToArgs(). Note that this changes the default behavior of clang -cc1 to always run the verifier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96077 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to disable the LLVM verifier pass (which is still alwaysJohn McCall2010-02-121-1/+1
| | | | | | | | | disabled in NDEBUG builds). The option applies only to -cc1 invocations and is: -disable_llvm_verifier git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96046 91177308-0d34-0410-b5e6-96231b3b80d8
* Check in the beginnings of my new vtable layout builder idea.Anders Carlsson2010-02-111-1/+2
| | | | | | | | | | | Right now, it's off by default but can be tested by passing -fdump-vtable-layouts to clang -cc1. This option will cause all vtables that will normally be emitted as part of codegen to also be dumped using the new layout code. I've also added a very simple new vtable layout test case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95865 91177308-0d34-0410-b5e6-96231b3b80d8
* clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.Daniel Dunbar2010-02-101-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95785 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement synthesizing properties by default.Fariborz Jahanian2010-02-091-0/+5
| | | | | | | | | | This is a non-fragile-abi feature only. Since it breaks existing code, it is currently placed under -fobjc-nonfragile-abi2 option for test purposes only until further notice. WIP. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95685 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a testbed for merging multiple ASTs into a single ASTDouglas Gregor2010-02-091-0/+5
| | | | | | | | context with the AST importer. WIP, still useless but at least it has a test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95683 91177308-0d34-0410-b5e6-96231b3b80d8