Граф коммитов

85 Коммитов

Автор SHA1 Сообщение Дата
Charles Davis 98b7c5c496 Add an option to specify the target C++ ABI to the frontend. Use it to
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
2010-06-11 01:06:47 +00:00
Daniel Dunbar bfbb39deab Frontend: Fix crashes on error paths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105759 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-09 22:30:54 +00:00
Daniel Dunbar faddc3e53a Frontend: Add FrontendAction support for handling LLVM IR inputs.
- 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
2010-06-07 23:26:47 +00:00
Daniel Dunbar c34ce3fa61 Frontend: Lift InputKind enumeration to top level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105577 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:22:09 +00:00
Daniel Dunbar 6b0cf67ae7 Frontend: Add CodeGenOptions::SimplifyLibCalls, and eliminate LangOptions argument to BackendConsumer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105574 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-07 23:19:17 +00:00
Daniel Dunbar 4ecc9b73b3 Driver: Add clang -cc1 -mrelax-all option, which sets relaxes all instructions when using -integrated-as.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104807 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-27 05:39:39 +00:00
Douglas Gregor d8e8a58ee3 Only enable code patterns (e.g., try { statements } catch (...) {
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
2010-05-25 21:41:55 +00:00
Daniel Dunbar 32148cef25 Driver/Frontend: Add -emit-codegen-only, for running irgen + codegen but not the
.s printer or .o writer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-25 18:41:01 +00:00
Daniel Dunbar 03e8ab2947 Driver: Move some argument lookup utilities into driver::ArgList.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104237 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-20 16:54:55 +00:00
Zhongxing Xu 6362b89373 Add option '-analyzer-max-loop', which specifies the maximum
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
2010-05-18 00:28:37 +00:00
Douglas Gregor f78cc4360e Add a stub frontend action for BoostCon, for next week's workshop.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103258 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:41:56 +00:00
Zhongxing Xu 7b99d12b4c Make -analyzer-inline-call not a separate analysis. Instead it's a boolean
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
2010-05-06 02:59:29 +00:00
Chris Lattner 6fbe8398ba add a new -fdiagnostics-show-category=none/id/name option, giving control
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
2010-05-04 21:55:25 +00:00
Douglas Gregor 6c1cb9916e Introduce a limit on the depth of the macro instantiation backtrace
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
2010-05-04 17:13:42 +00:00
Douglas Gregor e2e69ef80a Bump default template instantiation depth to 1024, as required by C++0x
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102847 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-01 16:59:21 +00:00
Daniel Dunbar 8a5e83c023 Frontend: Tie backend verification passes to CodeGenOptions::VerifyModule,
instead of NDEBUG.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102622 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-29 16:29:06 +00:00
Daniel Dunbar f643b9b338 NeXT: Clean up dispatch method policy selection.
- 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
2010-04-24 17:56:46 +00:00
Nick Lewycky ba5f6eced2 Teach clang -fixit to modify files in-place, or -fixit=suffix to create new
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
2010-04-24 01:30:46 +00:00
Fariborz Jahanian 33e982bf78 Support for -fno-constant-cfstrings option - wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-22 20:26:39 +00:00
Douglas Gregor 575cf37912 Introduce a limit on the depth of the template instantiation backtrace
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
2010-04-20 07:18:24 +00:00
Chandler Carruth eb5d7b7526 Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are not
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
2010-04-17 20:17:31 +00:00
Anders Carlsson 046c294a43 Vtable -> VTable renames across the board.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-17 20:15:18 +00:00
Daniel Dunbar fb937b8c5f clang -cc1: Add a -fno-bitfield-type-align option, for my own testing purposes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101370 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-15 15:06:22 +00:00
Daniel Dunbar 3f87fb08dd Driver/Frontend: Add support for -mllvm, which forwards options to the LLVM 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
2010-04-15 06:09:03 +00:00
Chris Lattner dd17394d22 implement altivec.h and a bunch of support code, patch by Anton Yartsev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101215 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-14 03:54:58 +00:00
Zhongxing Xu c09289d104 Add a cc1 option to specify the max number of nodes the analyzer can explore.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101120 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 06:44:31 +00:00
Chris Lattner bbea716832 add frontend support for -fdata-sections and -ffunction-sections,
patch by Sylvere Teissier!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101108 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 00:38:24 +00:00
Anders Carlsson 46116ce06a Rename -dump-record-layouts to -fdump-record-layouts now that the option behaves like aa flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100943 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-10 19:09:13 +00:00
John McCall 7002f4c03c Turn access control on by default in -cc1.
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
2010-04-09 19:03:51 +00:00
Daniel Dunbar b69eca5d21 Fronted: Kill overly specialized RecordLayoutDumper, just make -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
2010-04-08 02:59:56 +00:00
Chris Lattner 83e7a78a9f rename llvm::llvm_report_error -> llvm::report_fatal_error
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 22:58:06 +00:00
Chris Lattner c100214fdc add clang -cc1 level support for "-ferror-limit 42"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100687 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-07 20:37:06 +00:00
Douglas Gregor 4c2bcad7b8 Implement support for -nostdc++. Fixes PR6446.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-24 20:13:48 +00:00
Daniel Dunbar efb0fa9e11 C++: Add support for -fno-use-cxa-atexit.
- 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
2010-03-20 04:15:41 +00:00
Daniel Dunbar 2758595023 clang -cc1: Kill off -empty-input only, and replace with -init-only which is an
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
2010-03-19 19:44:04 +00:00
Douglas Gregor 94dc8f640e Optionally store a PreprocessingRecord in the preprocessor itself, and
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
2010-03-19 16:15:56 +00:00
John McCall 4b7a834e0f Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98541 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-15 10:54:44 +00:00
John McCall d46f98573b Re-introduce the ctor/dtor alias optimization, this time hidden behind a
command-line option which defaults off.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96649 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-19 01:32:20 +00:00
John McCall b689afb750 Raise the responsibility for passing -disable-llvm-verifier in NDEBUG builds
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
2010-02-13 03:50:24 +00:00
John McCall 824e19ed92 Add an option to disable the LLVM verifier pass (which is still always
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
2010-02-12 23:47:27 +00:00
Anders Carlsson 824d7ea07a Check in the beginnings of my new vtable layout builder idea.
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
2010-02-11 08:02:13 +00:00
Daniel Dunbar 7348288456 clang -cc1: Add -fsjlj-exceptions, which requires far too much button pushing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95785 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-10 18:48:44 +00:00
Fariborz Jahanian 412e798941 Implement synthesizing properties by default.
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
2010-02-09 19:31:38 +00:00
Douglas Gregor 9bed879896 Introduce a testbed for merging multiple ASTs into a single AST
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
2010-02-09 19:21:46 +00:00
Anders Carlsson a508b7de6c Add support for threadsafe statics, and make them the default (matching gcc).
Daniel, I'd appreciate a review of the driver/cc1 parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-06 23:23:06 +00:00
Daniel Dunbar da1573f959 clang -cc1: Wire up -emit-obj, for emitting object files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95182 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-03 01:18:43 +00:00
Daniel Dunbar 984eb8611d Driver/Frontend: Add support for -fobjc-legacy-dispatch, not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95004 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-01 21:07:25 +00:00
Douglas Gregor d93256e556 Introduce serialization and deserialization of diagnostic information
so that CIndex can report diagnostics through the normal mechanisms
even when executing Clang in a separate process. This applies both
when performing code completion and when using ASTs as an intermediary
for clang_createTranslationUnitFromSourceFile().

The serialized format is not perfect at the moment, because it does
not encapsulate macro-instantiation information. Instead, it maps all
source locations back to the instantiation location. However, it does
maintain source-range and fix-it information. To get perfect fidelity
from the serialized format would require serializing a large chunk of
the source manager; at present, it isn't clear if this code will live
long enough for that to matter.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94740 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-28 06:00:51 +00:00
Chris Lattner 52388f9aef diagnose invalid values of -ftabstop, patch by Christian Adaker!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93288 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-13 03:06:50 +00:00
Chris Lattner 124fca533d implement -ftabstop=width, patch by Christian Adåker
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-01-09 21:54:33 +00:00