History log of /external/clang/lib/Frontend/CompilerInvocation.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
ef8225444452a1486bd721f3285301fe84643b00 21-Jul-2014 Stephen Hines <srhines@google.com> Update Clang for rebase to r212749.

This also fixes a small issue with arm_neon.h not being generated always.

Includes a cherry-pick of:
r213450 - fixes mac-specific header issue
r213126 - removes a default -Bsymbolic on Android

Change-Id: I2a790a0f5d3b2aab11de596fc3a74e7cbc99081d
/external/clang/lib/Frontend/CompilerInvocation.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
/external/clang/lib/Frontend/CompilerInvocation.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
/external/clang/lib/Frontend/CompilerInvocation.cpp
762e567ee54171662111534108aebf8f1c0b303c 18-Nov-2013 Sylvestre Ledru <sylvestre@debian.org> Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
Expected Passes : 6721
Expected Failures : 20
Unsupported Tests : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Differential Revision: http://llvm-reviews.chandlerc.com/D2212

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ce5b5f13a6c90904040b29b9eb765bb7cd736f0b 17-Nov-2013 Hal Finkel <hfinkel@anl.gov> Add -freroll-loops to enable loop rerolling

This adds -freroll-loops (and -fno-reroll-loops in the usual way) to enable
loop rerolling as part of the optimization pass manager. This transformation
can enable vectorization, reduce code size (or both).

Briefly, loop rerolling can transform a loop like this:

for (int i = 0; i < 3200; i += 5) {
a[i] += alpha * b[i];
a[i + 1] += alpha * b[i + 1];
a[i + 2] += alpha * b[i + 2];
a[i + 3] += alpha * b[i + 3];
a[i + 4] += alpha * b[i + 4];
}

into this:

for (int i = 0; i < 3200; ++i) {
a[i] += alpha * b[i];
}

Loop rerolling is currently disabled by default at all optimization levels.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194967 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e22017e0b691ff02616e6a8e670b721d078d4bc9 15-Nov-2013 Alp Toker <alp@nuanti.com> Revert "Using an invalid -O falls back on -O3 instead of an error"

Trying to fix test failures since earlier today.

One of the tests added in this commit is outputting test/Driver/clang_f_opts.s
which the builders that build in-tree (eg. clang-native-arm-cortex-a9) are
trying to run as a test case, causing failures.

clang_f_opts.c:
If -### doesn't emit the warning then this test probably shouldn't be in
here in the first place. Frontend maybe?

invalid-o-level.c:
Running %clang_cc1 in the Driver tests doesn't make sense because -cc1
bypasses the driver. (I'm not reverting the commit that introduced this but
please fix instead of keeping it this way.)

Reverting to fix the build failures and also so that the tests can be thought
out more thoroughly.

This reverts commit r194817.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194845 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
eb4d7c3fceed6c6e4151489c0572cff36500db78 15-Nov-2013 Sylvestre Ledru <sylvestre@debian.org> Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: optimization level '-O20' is unsupported; using '-O3' instead.
1 warning generated.

This matches the gcc behavior (with a warning added)

Pass all tests:
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 94.14s
Expected Passes : 6721
Expected Failures : 20
Unsupported Tests : 17

(which was not the case of http://llvm-reviews.chandlerc.com/D2125)

Reviewers: chandlerc, rafael, rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits

Differential Revision: http://llvm-reviews.chandlerc.com/D2152

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194817 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2c050f6a68c4f871d26be63f8d598f1b64a8e16f 14-Nov-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Introduce "objcmt-white-list-dir-path=" option.

This options accepts a path to a directory, collects the filenames of the files
it contains, and the migrator will only modify files with the same filename.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b85a9ec6df63f30bbdef9a3975b1d31a680b15c1 13-Nov-2013 Diego Novillo <dnovillo@google.com> Add -fprofile-sample-use to Clang's driver.

This adds a new option -fprofile-sample-use=filename to Clang. It
tells the driver to schedule the SampleProfileLoader pass and passes
on the name of the profile file to use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5d2a20671954f55f765b96375e8bcd38367cb3ba 13-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator. Place use of NS_NONATOMIC_IOSONLY
on inferred property attribute under
-objcmt-ns-nonatomic-iosonly option.
// rdar://15442742


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
849f3ececee1293371bc0930fcb74b0a44f22c98 11-Nov-2013 Sylvestre Ledru <sylvestre@debian.org> Revert "Using an invalid -O falls back on -O3 instead of an error"

This reverts commit r194403.

Was breaking too many tests...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1cd76b1a44d74e9e2e8b8fcacc2d7ec290b54b76 11-Nov-2013 Sylvestre Ledru <sylvestre@debian.org> Using an invalid -O falls back on -O3 instead of an error

Summary:
Currently with clang:
$ clang -O20 foo.c
error: invalid value '20' in '-O20'

With the patch:
$ clang -O20 foo.c
warning: invalid value '20' in '-O20'. Fall back on value '3'

Reviewers: rengolin, hfinkel

Reviewed By: rengolin

CC: cfe-commits, hfinkel, rengolin

Differential Revision: http://llvm-reviews.chandlerc.com/D2125

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194403 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8442b6f8b8dccb334751a2836a8454229ebec1b0 08-Nov-2013 Douglas Gregor <dgregor@apple.com> Eliminate an unnecessary .c_str()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194228 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
195dd7c8448893e13a0cd8e776520f14cba65b08 06-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add a limit to the length of a sequence of 'operator->' functions we will
follow when building a class member access expression. Based on a patch by
Rahul Jain!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194161 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
cd569f2788ece55b9f790b6900164e2b2d5d966c 05-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator. Please annotation of properties with
NS_RETURNS_INNER_POINTER under -objcmt-returns-innerpointer-property
flag (off by default), as older compilers do not support such annotations.
// rdar://15396636


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194100 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3cebc73895daccea85984d8881b5b45c8f8df9c6 05-Nov-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y sized deallocation: if we have a use, but not a definition, of a sized
deallocation function (and the corresponding unsized deallocation function has
been declared), emit a weak discardable definition of the function that
forwards to the corresponding unsized deallocation.

This allows a C++ standard library implementation to provide both a sized and
an unsized deallocation function, where the unsized one does not just call the
sized one, for instance by putting both in the same object file within an
archive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d9553e35e1e3af6fc4ca817b169dc796a5b54bcd 01-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. Define a new cc1 flag
-fobjc-subscripting-legacy-runtime which is off
by default and on only when using ObjectiveC
legacy runtime. Use this flag to allow
array and dictionary subscripting and disallow
objectiveC pointer arithmatic in ObjectiveC
legacy runtime. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193889 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
28ce23a550d386b32aa60abbbf308d164992eb1e 25-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> I am about to change llvm::MemoryBuffer::getFile take take a Twine. Change
clang first so that the build still works.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193428 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
96d6c4596587df59821da10270d2102da4a49b73 11-Oct-2013 Manman Ren <manman.ren@gmail.com> Turn struct-path aware TBAA on by default.

Use -no-struct-path-tbaa to turn it off.
This is the same as r191695, which was reverted because it depends on a
commit that has issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ff05979144fc199e229aaeb1d248867d87d0d866 11-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Add -fno-function-sections and -fno-data-sections. Since
-f{function,data}-sections had no tests at all, add some, and verify that the
-fno variants work as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
39ebb02cb0bd342ced56de6d19aa9992aa0371b8 09-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator. Introduce a new objcmt-atomic-property option
and use it to infer all properties as 'atomic'.
// rdar://14988132


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9a7e09fffbad657f775417252bc966098dfb1501 07-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove -ast-dump-xml.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192131 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a00f8737e671b587e83280a53e85562c00a7a78d 02-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator: Add more options one for each
kind of migration. // rdar://15003157



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191858 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
081099d302b79d1746c7a39da14e3265971eb718 02-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator. Starting distiguising different
migrations under their own option.
wip and // rdar://15003157


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1596e5b368ddbdc4b9c3ecab75115b179b6e5391 01-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r191586 and r191695. They cause crashes when building with
-relaxed-aliasing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191725 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
03928403af872d3b04d1d5d5a5c4be2d4d366af4 30-Sep-2013 Manman Ren <manman.ren@gmail.com> Turn struct-path aware TBAA on by default.

Use -no-struct-path-tbaa to turn it off.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191695 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4cb295d3b32cb04215f87948fbf944ee4c31de1b 29-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Implement C++1y sized deallocation (n3778). This is not enabled by -std=c++1y;
instead, it's enabled by the -cc1 flag -fsized-deallocation, until we sort out
the backward-compatibility issues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
14f9889b9b88f73a891688d7732bf01a127d9e7c 27-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Replace -fobjc-default-synthesize-properties with disable-objc-default-synthesize-properties.

We want the modern behavior most of the time, so inverting the option simplifies
the driver and the tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1b8840ce0d7a3383915b29dc3779dfadec817458 24-Sep-2013 Daniel Jasper <djasper@google.com> Add -fmodule-map-file option.

With this option, arbitrarily named module map files can be specified
to be loaded as required for headers in the respective (sub)directories.

This, together with the extern module declaration allows for specifying
module maps in a modular fashion without the need for files called
"module.map".

Among other things, this allows a directory to contain two modules that
are completely independent of one another.

Review: http://llvm-reviews.chandlerc.com/D1697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191284 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ddd2dfc1d3f4a36cbe8cd775c588623a17049f9f 24-Sep-2013 Daniel Jasper <djasper@google.com> Module use declarations (II)

Review: http://llvm-reviews.chandlerc.com/D1546.

I have picked up this patch form Lawrence
(http://llvm-reviews.chandlerc.com/D1063) and did a few changes.

From the original change description (updated as appropriate):
This patch adds a check that ensures that modules only use modules they
have so declared. To this end, it adds a statement on intended module
use to the module.map grammar:

use module-id

A module can then only use headers from other modules if it 'uses' them.
This enforcement is off by default, but may be turned on with the new
option -fmodules-decluse.

When enforcing the module semantics, we also need to consider a source
file part of a module. This is achieved with a compiler option

-fmodule-name=<module-id>.

The compiler at present only applies restrictions to the module directly
being built.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191283 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
89e32745123c02159fa1d1f19f96bdd4173029f0 24-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: print diagnostics as "error(clang): foo" in /fallback mode

This solves two problems:

1) MSBuild will not flag the build as unsuccessful just because we print
an error in the output, since "error(clang):" doesn't seem to match
the regex it's using.

2) It becomes more clear that the diagnostic is coming from clang as
supposed to cl.exe.

Differential Revision: http://llvm-reviews.chandlerc.com/D1735

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1eef85246b411b55c493098266746d0d83c241ea 13-Sep-2013 David Tweed <david.tweed@arm.com> Certain multi-platform languages, such as OpenCL, have the concept of
address spaces which is both (1) a "semantic" concept and
(2) possibly a hardware level restriction. It is desirable to
be able to discard/merge the LLVM-level address spaces on arguments for which
there is no difference to the current backend while keeping
track of the semantic address spaces in a funciton prototype. To do this
enable addition of the address space into the name-mangling process. Add
some tests to document this behaviour against inadvertent changes.

Patch by Michele Scandale!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190684 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2956ef43da9c0e7bce8fae4a015255a2c19458bb 11-Sep-2013 Nico Rieck <nico.rieck@gmail.com> Add -fansi-escape-codes option

Some build systems use pipes for stdin/stderr. On nix-ish platforms colored
output can be forced by -fcolor-diagnostics. On Windows this option has
no effect in these cases because LLVM uses the console API (which only
operates on the console buffer) even if a console wrapper capable of
interpreting ANSI escape codes is used.

The -fansi-escape-codes option allows switching from the console API to
ANSI escape codes. It has no effect on other platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8bc56022db2d9b16aab25ce3b6fccda9dd8991fc 09-Sep-2013 David Tweed <david.tweed@arm.com> The OpenCL standard specifies the sizes and alignments of various types than other C-family
languages, as well as specifying errno is not set by the math functions. Make the
clang front-end set those appropriately when the OpenCL language option is set.

Patch by Erik Schnetter!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190296 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
617f4c5796b36017695b787a305bb42b93c5e4cf 03-Sep-2013 Eric Christopher <echristo@gmail.com> Attempt to migrate default dwarf version to 4 for linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189823 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5b98aba1d74184923da32016c3abbc20e9a7686d 29-Aug-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC migrator. This patch infers readonly properties for no-parameter
instance methods returning non-void. This will be quite noisy. So, it is
placed under a new migrator flag -objcmt-migrate-readonly-property.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189537 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5389b84a780ac17b63c10ad97cd5e3aaa41595b7 21-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Move -mfpmath handling to -cc1 and implement it for x86.

The original idea was to implement it all on the driver, but to do that the
driver needs to know the sse level and to do that it has to know the default
features of a cpu.

Benjamin Kramer pointed out that if one day we decide to implement support for
' __attribute__ ((__target__ ("arch=core2")))', then the frontend needs to
keep its knowledge of default features of a cpu.

To avoid duplicating which part of clang handles default cpu features,
it is probably better to handle -mfpmath in the frontend.

For ARM this patch is just a small improvement. Instead of a cpu list, we
check if neon is enabled, which allows us to reject things like

-mcpu=cortex-a9 -mfpu=vfp -mfpmath=neon

For X86, since LLVM doesn't support an independent ssefp feature, we just
make sure the selected -mfpmath matches the sse level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188939 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5fba5a789a238c29ef811a39a39be722443ec1b1 16-Aug-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Merge TextPathDiagnostics and ClangDiagPathDiagConsumer.

This once again restores notes to following their associated warnings
in -analyzer-output=text mode. (This is still only intended for use as a
debugging aid.)

One twist is that the warning locations in "regular" analysis output modes
(plist, multi-file-plist, html, and plist-html) are reported at a different
location on the command line than in the output file, since the command
line has no path context. This commit makes -analyzer-output=text behave
like a normal output format, which means that the *command line output
will be different* in -analyzer-text mode. Again, since -analyzer-text is
a debugging aid and lo-fi stand-in for a regular output mode, this change
makes sense.

Along the way, remove a few pieces of stale code related to the path
diagnostic consumers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188514 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
708002ede3938256a6223d153a0c040f7a40f5cc 09-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support /showIncludes

This option prints information about #included files to stderr. Clang could
already do it, this patch just teaches the existing code about the /showIncludes
style and adds the flag.

Differential Revision: http://llvm-reviews.chandlerc.com/D1333

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188037 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b26404a7505dab7ec3a16f6e3b85f95cfd59ba93 08-Aug-2013 Chandler Carruth <chandlerc@gmail.com> The only useful loop unrolling flag to give realistically is
'-fno-unroll-loops'. The option to the backend is even called
'DisableUnrollLoops'. This is precisely the form that Clang *didn't*
support. We didn't recognize the flag, we didn't pass it to the CC1
layer, and even if we did we wouldn't use it. Clang only inspected the
positive form of the flag, and only did so to enable loop unrolling when
the optimization level wasn't high enough. This only occurs for an
optimization level that even has a chance of running the loop unroller
when optimizing for size.

This commit wires up the 'no' variant, and switches the code to actually
follow the standard flag pattern of using the last flag and allowing
a flag in either direction to override the default.

I think this is still wrong. I don't know why we disable the loop
unroller entirely *from Clang* when optimizing for size, as the loop
unrolling pass *already has special logic* for the case where the
function is attributed as optimized for size! We should really be
trusting that. Maybe in a follow-up patch, I don't really want to change
behavior here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187969 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b3574796d7cc0113e54b6516fc16e17ca09459fb 08-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support the run-time selection options (/MD, /MT et al.)

These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

Differential Revision: http://llvm-reviews.chandlerc.com/D1315

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
056ec12ca14ee5014ea49786f719ceaa299a7e19 05-Aug-2013 Daniel Jasper <djasper@google.com> Add option to disable module loading.

This patch was created by Lawrence Crowl and reviewed in:
http://llvm-reviews.chandlerc.com/D963

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187738 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4ed47ccf892de9b725f64d6cfc309f0461105ba5 02-Aug-2013 Hans Wennborg <hans@hanshq.net> CC1: Only parse command-line options that have the CC1Option flag.

We already reject flags that don't have the CC1Option flag,
but we would previously do so after parsing the command-line
arguments.

Since the option parser now has a parameter for excluding options,
we should just use that instead.

Differential Revision: http://llvm-reviews.chandlerc.com/D1270

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
264d206244bde858471e4b6211aeba28fd8ce7cb 23-Jul-2013 Eli Bendersky <eliben@google.com> Add a -fno-math-builtin option to the Clang -cc1


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d412999a3da6387dbfaf00f7647132082e94310e 09-Jul-2013 Fariborz Jahanian <fjahanian@apple.com> ObjC migrator: Add -objcmt-migrate-property to do property
migration. Also, fixes an old bug where older migration
flags were not being checked for properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185948 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ceb6dc8e5afbd8e4dad7aaa1948994965fd8ff2e 28-Jun-2013 Benjamin Kramer <benny.kra@googlemail.com> Use the multiple argument form of path::append.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185164 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3473c8de3cb8de1cedc25151909514af05a25450 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove PathV1.h from CompilerInvocation.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ac1db6b2bde50e9a0f3846243f654f6c13682725 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm::sys::fs::getMainExecutable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fdf137b9073aa52423183fe886d072bc3b7d3889 25-Jun-2013 Nick Lewycky <nicholas@mxc.ca> Make -vectorize-... proper cc1 flags instead of abusing -backend-option. Fixes
usage of clang as a library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184812 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ab297ccbcc51d5197d4ddb4e99b7bc8868d38314 24-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -ast-dump-lookups switch to -cc1 to dump DeclContext lookup maps. Test to
follow.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184678 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
73b8d4bdd68372bff9eddc5a02675ee345a8a94f 21-Jun-2013 Nick Lewycky <nicholas@mxc.ca> Fix a leak of TargetMachine in clang. We'll continue to leak it on purpose if
given -disable-free. (Reviewed by John McCall over IRC.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fc0f91cf0673775ce4b8b174dbb05ad2e4e6cd01 19-Jun-2013 Manman Ren <mren@apple.com> Debug Info: support for gdwarf-2 gdwarf-3 gdwarf-4

These options will add a module flag with name "Dwarf Version".
The behavior flag is currently set to Warning, so when two values disagree,
a warning will be emitted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184276 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b8b52972c72b2ba6fe171c522e5d3d7d69503021 18-Jun-2013 John McCall <rjmccall@apple.com> Add support for -fpcc-struct-return. Patch by Arthur O'Dwyer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b1e25a1bc03292dc538d336573e0be1490223171 14-Jun-2013 Reid Kleckner <reid@kleckner.net> [Driver] Refactor clang driver to use LLVM's Option library

The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere

As discussed in the review, this change includes using directives in
header files. I'll make follow up changes to remove those in favor of
name specifiers.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D975

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183989 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
34392373fe25e943586de0fdbe37b806c3f7ff70 11-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Include PathV1.h in files that use it.

This is preparation for replacing Path.h with PathV2.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183781 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
cc8e22b4e940a6d74174343ec16547e3bb52e630 21-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Revert r182331, these checks should be based on the target not the host.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7efb8af368309b5a2e5f9fa4df6da136d1c5ac54 21-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> Move two Darwin-specific hacks into #ifdef __APPLE__. These were stat'ing
nonexistent Darwin-specific files on every module build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d8f681e135ebd536e25a60cdb23f4d531f1f993e 10-May-2013 Douglas Gregor <dgregor@apple.com> [Modules] Extend Darwin hack to include the modification time of SystemVersion.plist.

Fixes <rdar://problem/13856838>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181635 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e7565635002ce0daaaf4b714cdb472507af462ee 08-May-2013 Richard Smith <richard-llvm@metafoo.co.uk> C++1y: Add a step limit to constexpr evaluation, to catch runaway loops.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d99990df0b4aca43a0315b2928ff1b8baf704052 04-May-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r177218.

Per discussion in cfe-commits, asserting may be a better way than introducing a special test flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181073 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b82e117e4af1062b9f0d1aab89abf4aa804558f1 24-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Improve the implementation of the -Ofast option.

Specifically, allow the flags that fall under this umbrella (i.e., -O3,
-ffast-math, and -fstrict-aliasing) to be overridden/disabled with the
individual -O[0|1|2|s|z]/-fno- flags.

This also fixes the handling of various floating point optimization
flags that are modified by -ffast-math (and thus -Ofast as well).
Part of rdar://13622687

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180204 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f4910132078b4b8852fc46657f3150ed472f4654 16-Apr-2013 Daniel Dunbar <daniel@zuster.org> [Modules] Convert module specific -fno-modules-autolink into -fno-autolink.

- There is no reason to have a modules specific flag for disabling
autolinking. Instead, convert the existing flag into -fno-autolink (which
should cover other autolinking code generation paths like #pragmas if and
when we support them).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
31230e6fb3331192b5559cab539344235c715836 12-Apr-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13615607> Include SDK version information in the module hash.

This is a Darwin-SDK-specific hash criteria used to identify a
particular SDK without having to hash the contents of all of its
headers. If other platforms have such versioned files, we should add
those checks here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
05422365baa8e603237f865e0de52f73f8b77235 10-Apr-2013 Chad Rosier <mcrosier@apple.com> Remove unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179217 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d4fc9de6f7d9a56bdc2ec51d9cbbfd7d3cb0cf0a 10-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Add a -Ofast option, which enables -O3, -ffast-math, and
-fstrict-aliasing.
rdar://13622687


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6fd7d3067dd06584ef3940e88e31fea1a0e83588 10-Apr-2013 Dmitri Gribenko <gribozavr@gmail.com> Add an option to parse all comments as documentation comments

Patch by Amin Shali.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179180 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3769f38264ba46a18059ad82a3a506f27bbf2537 08-Apr-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13559825> Further reduce template instantiation depth down to 256, since we're blowing the stack for a trivial "factorial" class template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179057 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b37a73d5c6a0c8bb1f6e363d3b53980e4fa0cead 04-Apr-2013 Manman Ren <mren@apple.com> Initial support for struct-path aware TBAA.

Added TBAABaseType and TBAAOffset in LValue. These two fields are initialized to
the actual type and 0, and are updated in EmitLValueForField.
Path-aware TBAA tags are enabled for EmitLoadOfScalar and EmitStoreOfScalar.
Added command line option -struct-path-tbaa.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7cc0a110bcf3fe9c4d1269ea2ae7e72aa7f37531 04-Apr-2013 Manman Ren <mren@apple.com> revert r178784 since it does not have a commit message

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178796 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ab4ffe242935ae0dd66fbe0dcc792c1ad38b00c1 04-Apr-2013 Manman Ren <mren@apple.com> Index: include/clang/Driver/CC1Options.td
===================================================================
--- include/clang/Driver/CC1Options.td (revision 178718)
+++ include/clang/Driver/CC1Options.td (working copy)
@@ -161,6 +161,8 @@
HelpText<"Use register sized accesses to bit-fields, when possible.">;
def relaxed_aliasing : Flag<["-"], "relaxed-aliasing">,
HelpText<"Turn off Type Based Alias Analysis">;
+def struct_path_tbaa : Flag<["-"], "struct-path-tbaa">,
+ HelpText<"Turn on struct-path aware Type Based Alias Analysis">;
def masm_verbose : Flag<["-"], "masm-verbose">,
HelpText<"Generate verbose assembly output">;
def mcode_model : Separate<["-"], "mcode-model">,
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td (revision 178718)
+++ include/clang/Driver/Options.td (working copy)
@@ -587,6 +587,7 @@
Flags<[CC1Option]>, HelpText<"Disable spell-checking">;
def fno_stack_protector : Flag<["-"], "fno-stack-protector">, Group<f_Group>;
def fno_strict_aliasing : Flag<["-"], "fno-strict-aliasing">, Group<f_Group>;
+def fstruct_path_tbaa : Flag<["-"], "fstruct-path-tbaa">, Group<f_Group>;
def fno_strict_enums : Flag<["-"], "fno-strict-enums">, Group<f_Group>;
def fno_strict_overflow : Flag<["-"], "fno-strict-overflow">, Group<f_Group>;
def fno_threadsafe_statics : Flag<["-"], "fno-threadsafe-statics">, Group<f_Group>,
Index: include/clang/Frontend/CodeGenOptions.def
===================================================================
--- include/clang/Frontend/CodeGenOptions.def (revision 178718)
+++ include/clang/Frontend/CodeGenOptions.def (working copy)
@@ -85,6 +85,7 @@
VALUE_CODEGENOPT(OptimizeSize, 2, 0) ///< If -Os (==1) or -Oz (==2) is specified.
CODEGENOPT(RelaxAll , 1, 0) ///< Relax all machine code instructions.
CODEGENOPT(RelaxedAliasing , 1, 0) ///< Set when -fno-strict-aliasing is enabled.
+CODEGENOPT(StructPathTBAA , 1, 0) ///< Whether or not to use struct-path TBAA.
CODEGENOPT(SaveTempLabels , 1, 0) ///< Save temporary labels.
CODEGENOPT(SanitizeAddressZeroBaseShadow , 1, 0) ///< Map shadow memory at zero
///< offset in AddressSanitizer.
Index: lib/CodeGen/CGExpr.cpp
===================================================================
--- lib/CodeGen/CGExpr.cpp (revision 178718)
+++ lib/CodeGen/CGExpr.cpp (working copy)
@@ -1044,7 +1044,8 @@
llvm::Value *CodeGenFunction::EmitLoadOfScalar(LValue lvalue) {
return EmitLoadOfScalar(lvalue.getAddress(), lvalue.isVolatile(),
lvalue.getAlignment().getQuantity(),
- lvalue.getType(), lvalue.getTBAAInfo());
+ lvalue.getType(), lvalue.getTBAAInfo(),
+ lvalue.getTBAABaseType(), lvalue.getTBAAOffset());
}

static bool hasBooleanRepresentation(QualType Ty) {
@@ -1106,7 +1107,9 @@

llvm::Value *CodeGenFunction::EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo) {
+ llvm::MDNode *TBAAInfo,
+ QualType TBAABaseType,
+ uint64_t TBAAOffset) {
// For better performance, handle vector loads differently.
if (Ty->isVectorType()) {
llvm::Value *V;
@@ -1158,8 +1161,11 @@
Load->setVolatile(true);
if (Alignment)
Load->setAlignment(Alignment);
- if (TBAAInfo)
- CGM.DecorateInstruction(Load, TBAAInfo);
+ if (TBAAInfo) {
+ llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo,
+ TBAAOffset);
+ CGM.DecorateInstruction(Load, TBAAPath);
+ }

if ((SanOpts->Bool && hasBooleanRepresentation(Ty)) ||
(SanOpts->Enum && Ty->getAs<EnumType>())) {
@@ -1217,7 +1223,8 @@
bool Volatile, unsigned Alignment,
QualType Ty,
llvm::MDNode *TBAAInfo,
- bool isInit) {
+ bool isInit, QualType TBAABaseType,
+ uint64_t TBAAOffset) {

// Handle vectors differently to get better performance.
if (Ty->isVectorType()) {
@@ -1268,15 +1275,19 @@
llvm::StoreInst *Store = Builder.CreateStore(Value, Addr, Volatile);
if (Alignment)
Store->setAlignment(Alignment);
- if (TBAAInfo)
- CGM.DecorateInstruction(Store, TBAAInfo);
+ if (TBAAInfo) {
+ llvm::MDNode *TBAAPath = CGM.getTBAAStructTagInfo(TBAABaseType, TBAAInfo,
+ TBAAOffset);
+ CGM.DecorateInstruction(Store, TBAAPath);
+ }
}

void CodeGenFunction::EmitStoreOfScalar(llvm::Value *value, LValue lvalue,
bool isInit) {
EmitStoreOfScalar(value, lvalue.getAddress(), lvalue.isVolatile(),
lvalue.getAlignment().getQuantity(), lvalue.getType(),
- lvalue.getTBAAInfo(), isInit);
+ lvalue.getTBAAInfo(), isInit, lvalue.getTBAABaseType(),
+ lvalue.getTBAAOffset());
}

/// EmitLoadOfLValue - Given an expression that represents a value lvalue, this
@@ -2494,9 +2505,12 @@

llvm::Value *addr = base.getAddress();
unsigned cvr = base.getVRQualifiers();
+ bool TBAAPath = CGM.getCodeGenOpts().StructPathTBAA;
if (rec->isUnion()) {
// For unions, there is no pointer adjustment.
assert(!type->isReferenceType() && "union has reference member");
+ // TODO: handle path-aware TBAA for union.
+ TBAAPath = false;
} else {
// For structs, we GEP to the field that the record layout suggests.
unsigned idx = CGM.getTypes().getCGRecordLayout(rec).getLLVMFieldNo(field);
@@ -2508,6 +2522,8 @@
if (cvr & Qualifiers::Volatile) load->setVolatile(true);
load->setAlignment(alignment.getQuantity());

+ // Loading the reference will disable path-aware TBAA.
+ TBAAPath = false;
if (CGM.shouldUseTBAA()) {
llvm::MDNode *tbaa;
if (mayAlias)
@@ -2541,6 +2557,16 @@

LValue LV = MakeAddrLValue(addr, type, alignment);
LV.getQuals().addCVRQualifiers(cvr);
+ if (TBAAPath) {
+ const ASTRecordLayout &Layout =
+ getContext().getASTRecordLayout(field->getParent());
+ // Set the base type to be the base type of the base LValue and
+ // update offset to be relative to the base type.
+ LV.setTBAABaseType(base.getTBAABaseType());
+ LV.setTBAAOffset(base.getTBAAOffset() +
+ Layout.getFieldOffset(field->getFieldIndex()) /
+ getContext().getCharWidth());
+ }

// __weak attribute on a field is ignored.
if (LV.getQuals().getObjCGCAttr() == Qualifiers::Weak)
Index: lib/CodeGen/CGValue.h
===================================================================
--- lib/CodeGen/CGValue.h (revision 178718)
+++ lib/CodeGen/CGValue.h (working copy)
@@ -157,6 +157,11 @@

Expr *BaseIvarExp;

+ /// Used by struct-path-aware TBAA.
+ QualType TBAABaseType;
+ /// Offset relative to the base type.
+ uint64_t TBAAOffset;
+
/// TBAAInfo - TBAA information to attach to dereferences of this LValue.
llvm::MDNode *TBAAInfo;

@@ -175,6 +180,10 @@
this->ImpreciseLifetime = false;
this->ThreadLocalRef = false;
this->BaseIvarExp = 0;
+
+ // Initialize fields for TBAA.
+ this->TBAABaseType = Type;
+ this->TBAAOffset = 0;
this->TBAAInfo = TBAAInfo;
}

@@ -232,6 +241,12 @@
Expr *getBaseIvarExp() const { return BaseIvarExp; }
void setBaseIvarExp(Expr *V) { BaseIvarExp = V; }

+ QualType getTBAABaseType() const { return TBAABaseType; }
+ void setTBAABaseType(QualType T) { TBAABaseType = T; }
+
+ uint64_t getTBAAOffset() const { return TBAAOffset; }
+ void setTBAAOffset(uint64_t O) { TBAAOffset = O; }
+
llvm::MDNode *getTBAAInfo() const { return TBAAInfo; }
void setTBAAInfo(llvm::MDNode *N) { TBAAInfo = N; }

Index: lib/CodeGen/CodeGenFunction.h
===================================================================
--- lib/CodeGen/CodeGenFunction.h (revision 178718)
+++ lib/CodeGen/CodeGenFunction.h (working copy)
@@ -2211,7 +2211,9 @@
/// the LLVM value representation.
llvm::Value *EmitLoadOfScalar(llvm::Value *Addr, bool Volatile,
unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo = 0);
+ llvm::MDNode *TBAAInfo = 0,
+ QualType TBAABaseTy = QualType(),
+ uint64_t TBAAOffset = 0);

/// EmitLoadOfScalar - Load a scalar value from an address, taking
/// care to appropriately convert from the memory representation to
@@ -2224,7 +2226,9 @@
/// the LLVM value representation.
void EmitStoreOfScalar(llvm::Value *Value, llvm::Value *Addr,
bool Volatile, unsigned Alignment, QualType Ty,
- llvm::MDNode *TBAAInfo = 0, bool isInit=false);
+ llvm::MDNode *TBAAInfo = 0, bool isInit = false,
+ QualType TBAABaseTy = QualType(),
+ uint64_t TBAAOffset = 0);

/// EmitStoreOfScalar - Store a scalar value to an address, taking
/// care to appropriately convert from the memory representation to
Index: lib/CodeGen/CodeGenModule.cpp
===================================================================
--- lib/CodeGen/CodeGenModule.cpp (revision 178718)
+++ lib/CodeGen/CodeGenModule.cpp (working copy)
@@ -227,6 +227,20 @@
return TBAA->getTBAAStructInfo(QTy);
}

+llvm::MDNode *CodeGenModule::getTBAAStructTypeInfo(QualType QTy) {
+ if (!TBAA)
+ return 0;
+ return TBAA->getTBAAStructTypeInfo(QTy);
+}
+
+llvm::MDNode *CodeGenModule::getTBAAStructTagInfo(QualType BaseTy,
+ llvm::MDNode *AccessN,
+ uint64_t O) {
+ if (!TBAA)
+ return 0;
+ return TBAA->getTBAAStructTagInfo(BaseTy, AccessN, O);
+}
+
void CodeGenModule::DecorateInstruction(llvm::Instruction *Inst,
llvm::MDNode *TBAAInfo) {
Inst->setMetadata(llvm::LLVMContext::MD_tbaa, TBAAInfo);
Index: lib/CodeGen/CodeGenModule.h
===================================================================
--- lib/CodeGen/CodeGenModule.h (revision 178718)
+++ lib/CodeGen/CodeGenModule.h (working copy)
@@ -501,6 +501,11 @@
llvm::MDNode *getTBAAInfo(QualType QTy);
llvm::MDNode *getTBAAInfoForVTablePtr();
llvm::MDNode *getTBAAStructInfo(QualType QTy);
+ /// Return the MDNode in the type DAG for the given struct type.
+ llvm::MDNode *getTBAAStructTypeInfo(QualType QTy);
+ /// Return the path-aware tag for given base type, access node and offset.
+ llvm::MDNode *getTBAAStructTagInfo(QualType BaseTy, llvm::MDNode *AccessN,
+ uint64_t O);

bool isTypeConstant(QualType QTy, bool ExcludeCtorDtor);

Index: lib/CodeGen/CodeGenTBAA.cpp
===================================================================
--- lib/CodeGen/CodeGenTBAA.cpp (revision 178718)
+++ lib/CodeGen/CodeGenTBAA.cpp (working copy)
@@ -21,6 +21,7 @@
#include "clang/AST/Mangle.h"
#include "clang/AST/RecordLayout.h"
#include "clang/Frontend/CodeGenOptions.h"
+#include "llvm/ADT/SmallSet.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
@@ -225,3 +226,87 @@
// For now, handle any other kind of type conservatively.
return StructMetadataCache[Ty] = NULL;
}
+
+/// Check if the given type can be handled by path-aware TBAA.
+static bool isTBAAPathStruct(QualType QTy) {
+ if (const RecordType *TTy = QTy->getAs<RecordType>()) {
+ const RecordDecl *RD = TTy->getDecl()->getDefinition();
+ // RD can be struct, union, class, interface or enum.
+ // For now, we only handle struct.
+ if (RD->isStruct() && !RD->hasFlexibleArrayMember())
+ return true;
+ }
+ return false;
+}
+
+llvm::MDNode *
+CodeGenTBAA::getTBAAStructTypeInfo(QualType QTy) {
+ const Type *Ty = Context.getCanonicalType(QTy).getTypePtr();
+ assert(isTBAAPathStruct(QTy));
+
+ if (llvm::MDNode *N = StructTypeMetadataCache[Ty])
+ return N;
+
+ if (const RecordType *TTy = QTy->getAs<RecordType>()) {
+ const RecordDecl *RD = TTy->getDecl()->getDefinition();
+
+ const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
+ SmallVector <std::pair<uint64_t, llvm::MDNode*>, 4> Fields;
+ // To reduce the size of MDNode for a given struct type, we only output
+ // once for all the fields with the same scalar types.
+ // Offsets for scalar fields in the type DAG are not used.
+ llvm::SmallSet <llvm::MDNode*, 4> ScalarFieldTypes;
+ unsigned idx = 0;
+ for (RecordDecl::field_iterator i = RD->field_begin(),
+ e = RD->field_end(); i != e; ++i, ++idx) {
+ QualType FieldQTy = i->getType();
+ llvm::MDNode *FieldNode;
+ if (isTBAAPathStruct(FieldQTy))
+ FieldNode = getTBAAStructTypeInfo(FieldQTy);
+ else {
+ FieldNode = getTBAAInfo(FieldQTy);
+ // Ignore this field if the type already exists.
+ if (ScalarFieldTypes.count(FieldNode))
+ continue;
+ ScalarFieldTypes.insert(FieldNode);
+ }
+ if (!FieldNode)
+ return StructTypeMetadataCache[Ty] = NULL;
+ Fields.push_back(std::make_pair(
+ Layout.getFieldOffset(idx) / Context.getCharWidth(), FieldNode));
+ }
+
+ // TODO: This is using the RTTI name. Is there a better way to get
+ // a unique string for a type?
+ SmallString<256> OutName;
+ llvm::raw_svector_ostream Out(OutName);
+ MContext.mangleCXXRTTIName(QualType(Ty, 0), Out);
+ Out.flush();
+ // Create the struct type node with a vector of pairs (offset, type).
+ return StructTypeMetadataCache[Ty] =
+ MDHelper.createTBAAStructTypeNode(OutName, Fields);
+ }
+
+ return StructMetadataCache[Ty] = NULL;
+}
+
+llvm::MDNode *
+CodeGenTBAA::getTBAAStructTagInfo(QualType BaseQTy, llvm::MDNode *AccessNode,
+ uint64_t Offset) {
+ if (!CodeGenOpts.StructPathTBAA)
+ return AccessNode;
+
+ const Type *BTy = Context.getCanonicalType(BaseQTy).getTypePtr();
+ TBAAPathTag PathTag = TBAAPathTag(BTy, AccessNode, Offset);
+ if (llvm::MDNode *N = StructTagMetadataCache[PathTag])
+ return N;
+
+ llvm::MDNode *BNode = 0;
+ if (isTBAAPathStruct(BaseQTy))
+ BNode = getTBAAStructTypeInfo(BaseQTy);
+ if (!BNode)
+ return StructTagMetadataCache[PathTag] = AccessNode;
+
+ return StructTagMetadataCache[PathTag] =
+ MDHelper.createTBAAStructTagNode(BNode, AccessNode, Offset);
+}
Index: lib/CodeGen/CodeGenTBAA.h
===================================================================
--- lib/CodeGen/CodeGenTBAA.h (revision 178718)
+++ lib/CodeGen/CodeGenTBAA.h (working copy)
@@ -35,6 +35,14 @@
namespace CodeGen {
class CGRecordLayout;

+ struct TBAAPathTag {
+ TBAAPathTag(const Type *B, const llvm::MDNode *A, uint64_t O)
+ : BaseT(B), AccessN(A), Offset(O) {}
+ const Type *BaseT;
+ const llvm::MDNode *AccessN;
+ uint64_t Offset;
+ };
+
/// CodeGenTBAA - This class organizes the cross-module state that is used
/// while lowering AST types to LLVM types.
class CodeGenTBAA {
@@ -46,8 +54,13 @@
// MDHelper - Helper for creating metadata.
llvm::MDBuilder MDHelper;

- /// MetadataCache - This maps clang::Types to llvm::MDNodes describing them.
+ /// MetadataCache - This maps clang::Types to scalar llvm::MDNodes describing
+ /// them.
llvm::DenseMap<const Type *, llvm::MDNode *> MetadataCache;
+ /// This maps clang::Types to a struct node in the type DAG.
+ llvm::DenseMap<const Type *, llvm::MDNode *> StructTypeMetadataCache;
+ /// This maps TBAAPathTags to a tag node.
+ llvm::DenseMap<TBAAPathTag, llvm::MDNode *> StructTagMetadataCache;

/// StructMetadataCache - This maps clang::Types to llvm::MDNodes describing
/// them for struct assignments.
@@ -89,9 +102,49 @@
/// getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of
/// the given type.
llvm::MDNode *getTBAAStructInfo(QualType QTy);
+
+ /// Get the MDNode in the type DAG for given struct type QType.
+ llvm::MDNode *getTBAAStructTypeInfo(QualType QType);
+ /// Get the tag MDNode for a given base type, the actual sclar access MDNode
+ /// and offset into the base type.
+ llvm::MDNode *getTBAAStructTagInfo(QualType BaseQType,
+ llvm::MDNode *AccessNode, uint64_t Offset);
};

} // end namespace CodeGen
} // end namespace clang

+namespace llvm {
+
+template<> struct DenseMapInfo<clang::CodeGen::TBAAPathTag> {
+ static clang::CodeGen::TBAAPathTag getEmptyKey() {
+ return clang::CodeGen::TBAAPathTag(
+ DenseMapInfo<const clang::Type *>::getEmptyKey(),
+ DenseMapInfo<const MDNode *>::getEmptyKey(),
+ DenseMapInfo<uint64_t>::getEmptyKey());
+ }
+
+ static clang::CodeGen::TBAAPathTag getTombstoneKey() {
+ return clang::CodeGen::TBAAPathTag(
+ DenseMapInfo<const clang::Type *>::getTombstoneKey(),
+ DenseMapInfo<const MDNode *>::getTombstoneKey(),
+ DenseMapInfo<uint64_t>::getTombstoneKey());
+ }
+
+ static unsigned getHashValue(const clang::CodeGen::TBAAPathTag &Val) {
+ return DenseMapInfo<const clang::Type *>::getHashValue(Val.BaseT) ^
+ DenseMapInfo<const MDNode *>::getHashValue(Val.AccessN) ^
+ DenseMapInfo<uint64_t>::getHashValue(Val.Offset);
+ }
+
+ static bool isEqual(const clang::CodeGen::TBAAPathTag &LHS,
+ const clang::CodeGen::TBAAPathTag &RHS) {
+ return LHS.BaseT == RHS.BaseT &&
+ LHS.AccessN == RHS.AccessN &&
+ LHS.Offset == RHS.Offset;
+ }
+};
+
+} // end namespace llvm
+
#endif
Index: lib/Driver/Tools.cpp
===================================================================
--- lib/Driver/Tools.cpp (revision 178718)
+++ lib/Driver/Tools.cpp (working copy)
@@ -2105,6 +2105,8 @@
options::OPT_fno_strict_aliasing,
getToolChain().IsStrictAliasingDefault()))
CmdArgs.push_back("-relaxed-aliasing");
+ if (Args.hasArg(options::OPT_fstruct_path_tbaa))
+ CmdArgs.push_back("-struct-path-tbaa");
if (Args.hasFlag(options::OPT_fstrict_enums, options::OPT_fno_strict_enums,
false))
CmdArgs.push_back("-fstrict-enums");
Index: lib/Frontend/CompilerInvocation.cpp
===================================================================
--- lib/Frontend/CompilerInvocation.cpp (revision 178718)
+++ lib/Frontend/CompilerInvocation.cpp (working copy)
@@ -324,6 +324,7 @@
Opts.UseRegisterSizedBitfieldAccess = Args.hasArg(
OPT_fuse_register_sized_bitfield_access);
Opts.RelaxedAliasing = Args.hasArg(OPT_relaxed_aliasing);
+ Opts.StructPathTBAA = Args.hasArg(OPT_struct_path_tbaa);
Opts.DwarfDebugFlags = Args.getLastArgValue(OPT_dwarf_debug_flags);
Opts.MergeAllConstants = !Args.hasArg(OPT_fno_merge_all_constants);
Opts.NoCommon = Args.hasArg(OPT_fno_common);
Index: test/CodeGen/tbaa.cpp
===================================================================
--- test/CodeGen/tbaa.cpp (revision 0)
+++ test/CodeGen/tbaa.cpp (working copy)
@@ -0,0 +1,217 @@
+// RUN: %clang_cc1 -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -O1 -struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH
+// Test TBAA metadata generated by front-end.
+
+#include <stdint.h>
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+ uint16_t f16_2;
+ uint32_t f32_2;
+} StructA;
+typedef struct
+{
+ uint16_t f16;
+ StructA a;
+ uint32_t f32;
+} StructB;
+typedef struct
+{
+ uint16_t f16;
+ StructB b;
+ uint32_t f32;
+} StructC;
+typedef struct
+{
+ uint16_t f16;
+ StructB b;
+ uint32_t f32;
+ uint8_t f8;
+} StructD;
+
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+} StructS;
+typedef struct
+{
+ uint16_t f16;
+ uint32_t f32;
+} StructS2;
+
+uint32_t g(uint32_t *s, StructA *A, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !5
+ *s = 1;
+ A->f32 = 4;
+ return *s;
+}
+
+uint32_t g2(uint32_t *s, StructA *A, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !8
+ *s = 1;
+ A->f16 = 4;
+ return *s;
+}
+
+uint32_t g3(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9
+ A->f32 = 1;
+ B->a.f32 = 4;
+ return A->f32;
+}
+
+uint32_t g4(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !11
+ A->f32 = 1;
+ B->a.f16 = 4;
+ return A->f32;
+}
+
+uint32_t g5(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !12
+ A->f32 = 1;
+ B->f32 = 4;
+ return A->f32;
+}
+
+uint32_t g6(StructA *A, StructB *B, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !13
+ A->f32 = 1;
+ B->a.f32_2 = 4;
+ return A->f32;
+}
+
+uint32_t g7(StructA *A, StructS *S, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !14
+ A->f32 = 1;
+ S->f32 = 4;
+ return A->f32;
+}
+
+uint32_t g8(StructA *A, StructS *S, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !5
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !16
+ A->f32 = 1;
+ S->f16 = 4;
+ return A->f32;
+}
+
+uint32_t g9(StructS *S, StructS2 *S2, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !17
+ S->f32 = 1;
+ S2->f32 = 4;
+ return S->f32;
+}
+
+uint32_t g10(StructS *S, StructS2 *S2, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i16 4, i16* %{{.*}}, align 2, !tbaa !5
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !14
+// PATH: store i16 4, i16* %{{.*}}, align 2, !tbaa !19
+ S->f32 = 1;
+ S2->f16 = 4;
+ return S->f32;
+}
+
+uint32_t g11(StructC *C, StructD *D, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !20
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !22
+ C->b.a.f32 = 1;
+ D->b.a.f32 = 4;
+ return C->b.a.f32;
+}
+
+uint32_t g12(StructC *C, StructD *D, uint64_t count) {
+// CHECK: define i32 @{{.*}}(
+// CHECK: store i32 1, i32* %{{.*}}, align 4, !tbaa !4
+// CHECK: store i32 4, i32* %{{.*}}, align 4, !tbaa !4
+// TODO: differentiate the two accesses.
+// PATH: define i32 @{{.*}}(
+// PATH: store i32 1, i32* %{{.*}}, align 4, !tbaa !9
+// PATH: store i32 4, i32* %{{.*}}, align 4, !tbaa !9
+ StructB *b1 = &(C->b);
+ StructB *b2 = &(D->b);
+ // b1, b2 have different context.
+ b1->a.f32 = 1;
+ b2->a.f32 = 4;
+ return b1->a.f32;
+}
+
+// CHECK: !1 = metadata !{metadata !"omnipotent char", metadata !2}
+// CHECK: !2 = metadata !{metadata !"Simple C/C++ TBAA"}
+// CHECK: !4 = metadata !{metadata !"int", metadata !1}
+// CHECK: !5 = metadata !{metadata !"short", metadata !1}
+
+// PATH: !1 = metadata !{metadata !"omnipotent char", metadata !2}
+// PATH: !4 = metadata !{metadata !"int", metadata !1}
+// PATH: !5 = metadata !{metadata !6, metadata !4, i64 4}
+// PATH: !6 = metadata !{metadata !"_ZTS7StructA", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !7 = metadata !{metadata !"short", metadata !1}
+// PATH: !8 = metadata !{metadata !6, metadata !7, i64 0}
+// PATH: !9 = metadata !{metadata !10, metadata !4, i64 8}
+// PATH: !10 = metadata !{metadata !"_ZTS7StructB", i64 0, metadata !7, i64 4, metadata !6, i64 20, metadata !4}
+// PATH: !11 = metadata !{metadata !10, metadata !7, i64 4}
+// PATH: !12 = metadata !{metadata !10, metadata !4, i64 20}
+// PATH: !13 = metadata !{metadata !10, metadata !4, i64 16}
+// PATH: !14 = metadata !{metadata !15, metadata !4, i64 4}
+// PATH: !15 = metadata !{metadata !"_ZTS7StructS", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !16 = metadata !{metadata !15, metadata !7, i64 0}
+// PATH: !17 = metadata !{metadata !18, metadata !4, i64 4}
+// PATH: !18 = metadata !{metadata !"_ZTS8StructS2", i64 0, metadata !7, i64 4, metadata !4}
+// PATH: !19 = metadata !{metadata !18, metadata !7, i64 0}
+// PATH: !20 = metadata !{metadata !21, metadata !4, i64 12}
+// PATH: !21 = metadata !{metadata !"_ZTS7StructC", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4}
+// PATH: !22 = metadata !{metadata !23, metadata !4, i64 12}
+// PATH: !23 = metadata !{metadata !"_ZTS7StructD", i64 0, metadata !7, i64 4, metadata !10, i64 28, metadata !4, i64 32, metadata !1}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3105627bd76d6a0cc5ee305c99f4c96519bac9ac 04-Apr-2013 Eric Christopher <echristo@gmail.com> Plumb through the -fsplit-stack option using the existing backend
support.

Caveat: Other than the existing segmented stacks support, no
claims are made of this working.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178744 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1b461b0ad072fd36c8c20e7bd29448f08050a3c3 02-Apr-2013 Richard Smith <richard-llvm@metafoo.co.uk> Remove dead store.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178561 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c544ba09695e300f31355af342258bd57619e737 27-Mar-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13509689> Introduce -module-file-info option that provides information about a particular module file.

This option can be useful for end users who want to know why they
ended up with a ton of different variants of the "std" module in their
module cache. This problem should go away over time, as we reduce the
need for module variants, but it will never go away entirely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178148 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d44d2872b2ebe58237de4dbc350b82cab944ccc5 25-Mar-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13434605> Periodically prune the module cache so that it does not grow forever.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177918 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
83c546afef39d6b7be69f3f399804ebf037c4022 20-Mar-2013 Nick Lewycky <nicholas@mxc.ca> The flag "-coverage-function-names-in-data" is actually backwards -- we do
emit function names in .gcda files by default, and the flag turns that off!
Rename the flag to make it match what it actually does. This keeps the default
format compatible with gcc 4.2.

Also add a test for this flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f2b5e0707229e1149828ebc8d01d9308a997d6df 20-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Make clang emit linkage names in debug info for subprograms when coverage info
is enabled. Also add a new -test-coverage cc1 flag which makes testing coverage
possible and add our first clang-side coverage test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177470 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6aa240c03dd68ab413106d6af7a18af1c9b4e872 16-Mar-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove -Wspellcheck and replace it with a diagnostic option.

Thanks to Richard S. for pointing out that the warning would show up
with -Weverything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c3ae583a9a2e0e5c862a94b678c7cdfaab46a981 14-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Update GCOVProfiling pass creation for API change in r177002. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0f815f1f91e5cf0726fd8296445038fec3bed80b 07-Mar-2013 Nick Lewycky <nicholas@mxc.ca> Add flags for additional control over coverage generation. Pick the version
string to be emitted, and two properties about the files themselves.

Use $PWD to absolut-ify the path to the coverage file. Yes, this is what GCC
does. Reverts my own r175706.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176617 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
360355db57d15ce3c90051b05cca993a4c5ee8db 06-Mar-2013 Weiming Zhao <weimingz@codeaurora.org> revert r176531 due to clan-native-arm fails



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
46a2290c030597e26022fe2b535c8e4b0d30a765 06-Mar-2013 Weiming Zhao <weimingz@codeaurora.org> PR 11326: Lack diagnosic message when ABI conflicts on ARM

When both Triple and -mabi are used, it may result into conflicting ABI value.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ff971d7973aaa00c286b788d30f6919c7b1f4de2 23-Feb-2013 Eric Christopher <echristo@gmail.com> Propagate the split dwarf file information through into the backend
and through to the debug info in the module. In order to make the
testcase a bit more efficient allow the filename to go through
compilation for compile and not assemble jobs and turn off the
extract for cases where we don't create an object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175935 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6ebf09130479bc7605aa09a3e6c4dc2ba3513495 22-Feb-2013 Dmitri Gribenko <gribozavr@gmail.com> Comment parsing: add CommentOptions to allow specifying custom comment block commands

Add an ability to specify custom documentation block comment commands via a new
class CommentOptions. The intention is that this class will hold future
customizations for comment parsing, including defining documentation comments
with specific numbers of parameters, etc.

CommentOptions instance is a member of LangOptions.

CommentOptions is controlled by a new command-line parameter
-fcomment-block-commands=Foo,Bar,Baz.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175892 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9e738cc9d4b4655c44dadeb22f3a314daf43b995 22-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> Add -fbracket-depth=N, analogous to -ftemplate-depth= and -fconstexpr-depth=,
to control the check for the C 5.2.4.1 / C++ [implimits] restriction on nesting
levels for parentheses, brackets and braces.

Some code with heavy macro use exceeds the default limit of 256, but we don't
want to increase it generally to avoid stack overflow on stack-constrained
systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a880b19aa6ef1dc95936f5de052be7a7d6ee6814 19-Feb-2013 John McCall <rjmccall@apple.com> Add support for -fvisibility-ms-compat.

We treat this as an alternative to -fvisibility=<?>
which changes the default value visibility to "hidden"
and the default type visibility to "default".

Expose a -cc1 option for changing the default type
visibility, repurposing -fvisibility as the default
value visibility option (also setting type visibility
from it in the absence of a specific option).

rdar://13079314

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175480 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
953a61f26bf79932b9699b09add4c388764de170 07-Feb-2013 Douglas Gregor <dgregor@apple.com> Rename -fmodule-cache-path <blah> to -fmodules-cache-path=<blah> for consistency.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
005d51bc4f16a7b330e13082d186b72953bde581 07-Feb-2013 Douglas Gregor <dgregor@apple.com> Be a little more permissive with -fmodules-ignore-macro= by removing everything after the second '=' if it is there.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174567 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2a06085281d1b6aee628f85e8676eec04542cbc9 07-Feb-2013 Douglas Gregor <dgregor@apple.com> Introduce -fmodules-ignore-macro=NNN to ignore a macro when building/loading modules.

The use of this flag enables a modules optimization where a given set
of macros can be labeled as "ignored" by the modules
system. Definitions of those macros will be completely ignored when
building the module hash and will be stripped when actually building
modules. The overall effect is that this flag can be used to
drastically reduce the number of

Eventually, we'll want modules to tell us what set of macros they
respond to (the "configuration macros"), and anything not in that set
will be excluded. However, that requires a lot of per-module
information that must be accurate, whereas this option can be used
more readily.

Fixes the rest of <rdar://problem/13165109>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3ad86fd2effccf1b9337e8cb9a317e4353cec275 05-Feb-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [frontend] Don't put a PCH/PTH filename into the set of includes in the preprocessor options;
since only one of them is allowed in command-line, process them separately.

Otherwise, if more than one is specified in the command-line, one is processed normally
and the others are going to be treated and included as header files.

Related to radar://13140508

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ac3a3e7a402cd349dd2b7d70cd92c5fe702ae831 30-Jan-2013 Anna Zaks <ganna@apple.com> [analyzer] Make shallow mode more shallow.

Redefine the shallow mode to inline all functions for which we have a
definite definition (ipa=inlining). However, only inline functions that
are up to 4 basic blocks large and cut the max exploded nodes generated
per top level function in half.

This makes shallow faster and allows us to keep inlining small
functions. For example, we would keep inlining wrapper functions and
constructors/destructors.

With the new shallow, it takes 104s to analyze sqlite3, whereas
the deep mode is 658s and previous shallow is 209s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6bbe1442a5f3f5f761582a9005e9edf1d49c4da2 30-Jan-2013 Anna Zaks <ganna@apple.com> [analyzer] Use analyzer config for max-inlinable-size option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
74c2498bb9e339345ee32bdd095e76157cec3b86 30-Jan-2013 Jordan Rose <jordan_rose@apple.com> Don't warn about Unicode characters in -E mode.

People use the C preprocessor for things other than C files. Some of them
have Unicode characters. We shouldn't warn about Unicode characters
appearing outside of identifiers in this case.

There's not currently a way for the preprocessor to tell if it's in -E mode,
so I added a new flag, derived from the PreprocessorOutputOptions. This is
only used by the Unicode warnings for now, but could conceivably be used by
other warnings or even behavioral differences later.

<rdar://problem/13107323>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
59fd63581d6d572f23e82e81a50e0b940c8d1089 30-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Frontend] Remove HeaderSearchOptions::Entry::IsInternal, which is unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ef84554239d77cc52a14b42f2bff8c2d02e7630e 30-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Frontend] Add an ExternCSystem include entry group.

- The only group where it makes sense for the "ExternC" bit is System, so this
simplifies having to have the extra isCXXAware (or ImplicitExternC, depending
on what code you talk to) bit caried around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173859 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c33c9f7a9a955463b3418afd461774c726913800 30-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Frontend] Make the include dir group independent from the "use sysroot" bit.

- This slightly decouples the path handling, since before the group sometimes
dominated the "use sysroot" bit, but it was still passed in via the API.

- No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173855 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
78d85b1c5830a881c0a20a1b3fea99ee73149590 30-Jan-2013 Chad Rosier <mcrosier@apple.com> [ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
implementation; this is much more inline with the original implementation
(i.e., pre-ubsan) and does not require run-time library support.

The trapping implementation can be invoked using either '-fcatch-undefined-behavior'
or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter
being preferred. Eventually, the -fcatch-undefined-behavior' flag will be removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
20c6f2eae500242d3aef5daaa55d440a0786a1fd 28-Jan-2013 Douglas Gregor <dgregor@apple.com> Enable the global module index by default. Introduce the
-fno-modules-global-index -cc1 option to allow one to disable the
index for performance testing purposes, but with a 10% win in
-fsyntax-only time, there is no reason a user would do this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173707 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
eab6652b7e417c8e46b21c7d340f3a7d41492d6e 25-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Frontend] Remove another IsUserSpecified member variable that is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173412 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f3fc21f7277921677244b2c4b14f3a67e0cde8d1 25-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Frontend] The -iwithprefix option belongs in the After category, according to
GCC docs.
- Found by inspection.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173410 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f575d6e7c3b887ea4c5394d2c7e322c7a929a57e 25-Jan-2013 Douglas Gregor <dgregor@apple.com> Rename the -cc1 option "-generate-module-index" to
"-fmodules-global-index" and expand its behavior to include both the
use and generation of the global module index.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bfa9ab8183e2fdc74f8633d758cb0c6201314320 25-Jan-2013 Anna Zaks <ganna@apple.com> [analyzer] Replace "-analyzer-ipa" with "-analyzer-config ipa".

The idea is to eventually place all analyzer options under
"analyzer-config". In addition, this lays the ground for introduction of
a high-level analyzer mode option, which will influence the
default setting for IPAMode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173385 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a6b00fc97669aa25d89ae9f202b05dfadfd0e324 23-Jan-2013 Douglas Gregor <dgregor@apple.com> Implement the writer side of the global module index.

The global module index is a "global" index for all of the module
files within a particular subdirectory in the module cache, which
keeps track of all of the "interesting" identifiers and selectors
known in each of the module files. One can perform a fast lookup in
the index to determine which module files will have more information
about entities with a particular name/selector. This information can
help eliminate redundant lookups into module files (a serious
performance problem) and help with creating auto-import/auto-include
Fix-Its.

The global module index is created or updated at the end of a
translation unit that has triggered a (re)build of a module by
scraping all of the .pcm files out of the module cache subdirectory,
so it catches everything. As with module rebuilds, we use the file
system's atomicity to synchronize.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
19dbb20ac4371fae3190379a7e7bd467af3c00aa 23-Jan-2013 Joey Gouly <joey.gouly@arm.com> Add a new LangOpt NativeHalfType. This option allows for native half/fp16
operations (as opposed to storage only half/fp16).

Also add some semantic checks for OpenCL half types.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173254 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b2e2157f905b0b6e27f1d3f5e1f38778c6731813 22-Jan-2013 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-style
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4bdc60434c79126b75aee2bb391275f3bb746364 20-Jan-2013 Alexey Samsonov <samsonov@google.com> Add top-level Clang flag -f(no-)sanitize-address-zero-base-shadow that makes AddressSanitizer use bottom of the address space for the shadow memory. On Linux it can be used with -fPIE/-pie to improve performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d47afb96a3f988e6d21a92fe4dfe875ab227c7c0 20-Jan-2013 Sean Silva <silvas@purdue.edu> Nuke SetUpBuildDumpLog.

Also, it was the only reason that `argc` and `argv` were being passed
into createDiagnostics, so remove those parameters and clean up callers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172945 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4f45bc099f2665bc6e4bcbb169aa452390dbf3fe 18-Jan-2013 Will Dietz <wdietz2@illinois.edu> [ubsan] Add support for -fsanitize-blacklist

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172808 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f43b7214e812ddca74a6213608c69c960e067956 16-Jan-2013 Douglas Gregor <dgregor@apple.com> Add -fmodules-autolink/-fno-modules-autolink (defaults to on) so that
users can explicitly enable/disable modules autolinking.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172592 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
50a70cd11801fd9a700d06e447095249c34c261f 15-Jan-2013 Douglas Gregor <dgregor@apple.com> Add -fopenmp -cc1 option and wire it up to define _OPENMP, from Alexey Bataev!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172509 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
cfa88f893915ceb8ae4ce2f17c46c24a4d67502f 12-Jan-2013 Dmitri Gribenko <gribozavr@gmail.com> Remove useless 'llvm::' qualifier from names like StringRef and others that are
brought into 'clang' namespace by clang/Basic/LLVM.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172323 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
80ad52f327b532bded5c5b0ee38779d841c6cd35 02-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> s/CPlusPlus0x/CPlusPlus11/g


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2d382d149b442b928fd3fb8edcc8d82ea9325872 30-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Recover by default, use -fno-sanitize-recover to disable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
34ef11be9d09ebf916ab02a521e37be6e9e102d3 24-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Support -fsanitize-memory-track-origins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
95f38f614c8005b5cc398021e1f9e28ed233d533 21-Dec-2012 Roman Divacky <rdivacky@freebsd.org> Sort the includes according to the coding standard.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170905 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
87aa2fbc75a897e7c4a4082374aaba3f50db6f0f 21-Dec-2012 Roman Divacky <rdivacky@freebsd.org> Remove duplicate includes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170903 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4fb10d1c67fd9596998cf05016fa3a4ed6fd0fb3 06-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver, ms-inline asm] -fms-compatibility enables -fms-extensions, so this should enable
the AsmBlocks language extension as well.
rdar://12808010

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e23fbf1fca9be5653ca706ccefc31d5e5a3a334d 06-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver, ms-inline asm] Have -fms-extensions enable the AsmBlocks language
option. MS-style inline asm can now be enabled by either -fasm-blocks or
-fms-extensions.
rdar://12808010

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
15490fd42d7d8dca2f9b5b3a9dc074892ca1acd7 05-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver, ms-inline asm] MS-Style inline assembly is controlled by the
-fasm-blocks flag, not the -fms-extensions flag.
rdar://12808010

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
55fc873017f10f6f566b182b70f6fc22aefa3464 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Sort all of Clang's files under 'lib', and fix up the broken headers
uncovered.

This required manually correcting all of the incorrect main-module
headers I could find, and running the new llvm/utils/sort_includes.py
script over the files.

I also manually added quite a few missing headers that were uncovered by
shuffling the order or moving headers up to be main-module-headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
91ecfa6af51836d3ccc90beddab1193b0c060739 03-Dec-2012 Alexey Samsonov <samsonov@google.com> Add Clang flags -fsanitize-blacklist and -fno-sanitize-blacklist. Make this flag usable for ASan. Blacklisting can be used to disable sanitizer checks for particular file/function/object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169144 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ad95481b2769ad61f23afc5e2c31f11c66090657 02-Dec-2012 Will Dietz <wdietz2@illinois.edu> [ubsan] Add flag to enable recovery from checks when possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169114 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
85489080807b47b70d26611ba543801e16bec4cd 23-Nov-2012 Joey Gouly <joey.gouly@arm.com> PR14306: Move -fbounds-checking to -fsanitize=bounds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3d145f660a23d5bdabdd1ead83c51f3df1489b09 15-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> block extended signatur option. Change previous option
to a cc1 -fencode-extended-block-signature and pass it
to cc1 and recognize this option to produce extended block
type signature. // rdar://12109031


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
931c0833811c030884fa50b2ccbd3c34f0f4c4ee 15-Nov-2012 Lang Hames <lhames@gmail.com> Make -ffp-contract a codegen option, rather than a laguage option. This makes
more sense anyway - it determines how expressions are codegen'd. It also ensures
that -ffp-contract=fast has the intended effect when compiling LLVM IR.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
62221b17c90457df9ca0ff20bb54d634e8951def 15-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -cc1 option -fno-diagnostics-use-presumed-location, a handy mode for
working with preprocessed testcases. This causes source locations in
diagnostics to point at the spelling location instead of the presumed location,
while still keeping the semantic effects of the line directives (entering and
leaving system-header mode, primarily).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168004 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
06cffc0511ba76d979fad9ef6944e685936b62f0 15-Nov-2012 Fariborz Jahanian <fjahanian@apple.com> objective-C blocks: under cc1 flag -encode-extended-block-signature,
generate expanded signature encoding to include types as we
already do this for protocol method lists.
// rdar://12109031


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167997 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bb23628148f555a4cf71f98c27096a7a804c085c 11-Nov-2012 Nico Weber <nicolasweber@gmx.de> s/BCPLComment/LineComment/

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167690 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
485577dcac0b0877cfb5395b365490a0189c66f5 09-Nov-2012 Chad Rosier <mcrosier@apple.com> Implement -mstrict-align using '-backend-option -arm-strict-align' as this saves
us from having to make any backend changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167623 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7e293276281bd5bf8526c064d298082b08f0bd8b 09-Nov-2012 Chad Rosier <mcrosier@apple.com> [driver] Add a -mstrict-align compiler option for ARM targets.
rdar://12340498

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167619 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3043175274899e086c8664fe64c8fb4b9eacb733 06-Nov-2012 Douglas Gregor <dgregor@apple.com> Split the instrinsic header wmmintrin.h into AES and PCLMUL parts, so
that we can model them as separate submodules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167420 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d6396a681c9acbe56bc41bbc2bed2db45755bcd7 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Use the individual -fsanitize=<...> arguments to control which of the UBSan
checks to enable. Remove frontend support for -fcatch-undefined-behavior,
-faddress-sanitizer and -fthread-sanitizer now that they don't do anything.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c4dabadb51475e76b606024f144e7cf93b0bad00 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -fsanitize=<sanitizers> argument to driver and frontend, and add
-fno-sanitize=<sanitizers> argument to driver. These allow ASan, TSan, and the
various UBSan checks to be enabled and disabled separately. Right now, the
different modes can't be combined, but the intention is that combining UBSan
and the other sanitizers will be permitted in the near future.

Currently, the UBSan checks will all be enabled if any of them is; that will be
fixed by the next patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167411 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ca1b62a33cacee20d3bd756210d3211dd663209e 05-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Rename LangOptions members for address sanitizer and thread sanitizer from
*Sanitizer to Sanitize* in preparation for later patches.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
984e2eb52ce97eae001a28e54f36e624e98c12a7 05-Nov-2012 Douglas Gregor <dgregor@apple.com> Hash the various compiler version, target, preprocessor, and
header-search options into the module hash. We're just using
ADT/Hashing.hpp for this, which isn't as cryptographically strong as
I'd like, but it'll do. If someone contributes (say) and MD4
implementation, we'd happily switch to that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167397 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1d489cf4a04ad0ad8ac2696e4eed0995f3a67288 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove first argument from Arg::getValue; it's been unused since r105760.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7c3f8b3dafebc87b4b1492276f63b6cabbc7c59b 01-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove CompilerInvocation::toArgs and clang -cc1test mode. These were untested
and apparently unused (and since they are untested, they're presumably also
broken).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167210 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
286d6236850ed3710822e659afdfdf08a315716b 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> Reverted back the changes made in 166868 and in 166869

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f3b52315e2ee52bdff9cba31b037c7e6b3adfadc 27-Oct-2012 Mahesha S <mahesha.llvm@gmail.com> -------------------------------------------------
Feature:
OpenMP support in CLANG:

Sub-Feature:
Support for option -fopenmp

Files Changed/Added:
* include/clang/Driver/Options.td (C)
* include/clang/Basic/LangOptions.def (C)
* lib/Driver/Tools.cpp (C)
* lib/Frontend/CompilerInvocation.cpp (C)

Test Cases Changed/Added:
* test/Driver/clang_fopenmp_opt.c (A)
-------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
14e71f04136de056c08ffb9ccd44b4ca391cc8a5 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c042edd54face617a3b9d0b4b9d5a3ff229d0f48 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4d9e497a2b1eab3b1214848216050c64fc3acfd6 24-Oct-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Replace -analyzer-no-eagerly-trim-egraph with graph-trim-interval.

After every 1000 CFGElements processed, the ExplodedGraph trims out nodes
that satisfy a number of criteria for being "boring" (single predecessor,
single successor, and more). Rather than controlling this with a cc1 option,
which can only disable this behavior, we now have an analyzer-config option,
'graph-trim-interval', which can change this interval from 1000 to something
else. Setting the value to 0 disables reclamation.

The next commit relies on this behavior to actually test anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166528 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
dc7b641574a733624489bd87fc7061771edf2113 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Use a .def file for most of the diagnostic options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
02c23ebf41ae2f70da0ba7337e05c51fbfe35f7f 24-Oct-2012 Douglas Gregor <dgregor@apple.com> Make DiagnosticOptions intrusively reference-counted, and make sure
the various stakeholders bump up the reference count. In particular,
the diagnostics engine now keeps the DiagnosticOptions object alive.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166508 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4cdad3151bfb2075c6bdbfe89fbb08f31a90a45b 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Switch CodeGenOptions over to a .def file, like we do with LangOptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4ec429d1be4ede3d02712714f20470b2c87f748c 23-Oct-2012 Douglas Gregor <dgregor@apple.com> Handle implicitly-included PCH files the same way as
implicitly-included PTH files during initialization, delaying the
mapping down to the "original source file" until after later in the
initialization process.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166452 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c635710bcbb9598acd5a14647ba7ca28bee89a68 23-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] Add prefixes to options.

Each option has a set of prefixes. When matching an argument such as
-funroll-loops. First the leading - is removed as it is a prefix. Then
a lower_bound search for "funroll-loops" is done against the option table by
option name. From there each option prefix + option name combination is tested
against the argument.

This allows us to support Microsoft style options where both / and - are valid
prefixes. It also simplifies the cases we already have where options come in
both - and -- forms. Almost every option for gnu-ld happens to have this form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
91e06dab9335ed6b4474a74353549c708cf3d936 20-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] Make Option non clang specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166348 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f38523388174760dcbad810ef60d8504d7df6b4c 19-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r166223 and the subsequent commits that depend on it, r166230 & r166235.

This seems to have introduced assertion hit when building compiler-rt.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166245 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
da3301eec823fe770bfa49a1cb19649506caa698 18-Oct-2012 Eric Christopher <echristo@gmail.com> Add a new option for and disable column number information as there
are no known current users of column info. Robustify and fix up
a few tests in the process. Reduces the size of debug information
by a small amount.

Part of PR14106

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d2deb91b02ae1d810719e4a5a63dc404f362575a 18-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] Make Option non clang specific.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166230 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5ba49c0177bd594a9760956f51293b5731b03d6d 18-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -std=c++1y argument, for *highly* experimental C++14 support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166139 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
57016dda61498294120b1a881d9e6606337b29d9 17-Oct-2012 Douglas Gregor <dgregor@apple.com> Serialize TargetOptions into an AST file, and make sure that we keep
target options around so they can be accessed at any point (rather
than keeping them transient).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
127ff2ea6440c3da4b47f9c8b3b190254a97e7b5 13-Sep-2012 Ted Kremenek <kremenek@apple.com> Conditionally parse documentation comments in system headers by
passing -fretain-comments-from-system-headers. By default, the
compiler no longer parses such documentation comments, as they
can result in a noticeable compile time/PCH slowdown.

Fixes <rdar://problem/11860820>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163778 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5a1ffe98b04120846a15f7105905b5f363b08635 06-Sep-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Always include destructors in the analysis CFG.

While destructors will continue to not be inlined (unless the analyzer
config option 'c++-inlining' is set to 'destructors'), leaving them out
of the CFG is an incomplete model of the behavior of an object, and
can cause false positive warnings (like PR13751, now working).

Destructors for temporaries are still not on by default, since
(a) we haven't actually checked this code to be sure it's fully correct
(in particular, we probably need to be very careful with regard to
lifetime-extension when a temporary is bound to a reference,
C++11 [class.temporary]p5), and
(b) ExprEngine doesn't actually do anything when it sees a temporary
destructor in the CFG -- not even invalidate the object region.

To enable temporary destructors, set the 'cfg-temporary-dtors' analyzer
config option to '1'. The old -cfg-add-implicit-dtors cc1 option, which
controlled all implicit destructors, has been removed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163264 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5b86ffd219bdee7720217d5755b772726668b242 05-Sep-2012 Abramo Bagnara <abramo.bagnara@gmail.com> Allow disabling of wchar_t type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
45796b10d11869e86c6b85e24df165410536b313 31-Aug-2012 Ted Kremenek <kremenek@apple.com> Make AnalyzerOptions a shared object between CompilerInvocation and
AnalysisManager, allowing the StringMap of configuration values to
be propagated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
987695a5ddd78beca784d4e503ffbc2dc879181a 31-Aug-2012 Ted Kremenek <kremenek@apple.com> Move AnalyzerOptions.h into 'Core' StaticAnalyzer sub-library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162977 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3f2a55d81983577c85c03f6b9844f51c566c785b 31-Aug-2012 Anna Zaks <ganna@apple.com> [analyzer] Make analyzer-ipa=dynamic-bifurcate the default.

There are two tests regressions that come from the fact that the Retain
Count checker does not cancel out inlining of ObjC methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162950 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2fa9d72d4d23ccdcd4137946e5ebafac7a04f04c 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Rename 'MaxLoop' to 'maxBlockVisitOnPath' to reflect reality. We
should consider renaming the command line option as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162932 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3b8a04004afa46057a9af4afbd086be71d619793 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Rename 'VisualizeEGUbi' and 'VisualizeEGDot' to 'visualizeExplodedGraphWithUbigGraph'
and 'visualizeExplodedGraphWithGraphViz' respectively.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162931 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0caa2d47b84337e942b3f6652adfafe4ae506cfe 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Rename AnalyzerOptions 'EagerlyAssume' to 'eagerlyAssumeBinOpBifurcation'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
255d4d4226b24036ceb11228fbb74286e58620f7 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Store const& to AnalyzerOptions in AnalysisManager instead of copying
individual flags.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162929 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
82f5aceed89b85e79373086b7e0e7986e2c59179 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Move Analyses.def to include/clang/StaticAnalyzer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162927 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
318cc3c07eaca04d319be841e9e3bac35d1ff9f5 30-Aug-2012 Ted Kremenek <kremenek@apple.com> Change -analyzer-config to use '=' as the key-value separator, and only
support the '-analyzer-config key=val' variant.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162891 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7b73e0832b20af1f43601a3d19e76d02d9f4dce5 29-Aug-2012 Ted Kremenek <kremenek@apple.com> Add new -cc1 driver option -analyzer-config, which allows one to specify
a comma separated collection of key:value pairs (which are strings). This
allows a general way to provide analyzer configuration data from the command line.

No clients yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
56d7f2348a182002563700db2158da0c6fc115a5 24-Aug-2012 Chad Rosier <mcrosier@apple.com> [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a
CodeGen option to a LangOpt option. In turn, hoist the guard into the parser
so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This
should restore the behavior of clang to that prior to r158325.
<rdar://problem/12163681>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c568e2f801a62e442cbbd823b71f70175715661f 21-Aug-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Set the default IPA mode to 'basic-inlining', which excludes C++.

Under -analyzer-ipa=basic-inlining, only C functions, blocks, and C++ static
member functions are inlined -- essentially, the calls that behave like simple
C function calls. This is essentially the behavior in Xcode 4.4.

C++ support still has some rough edges, and we don't want users to be worried
about them if they download and run their own checker. (In particular, the
massive number of false positives for analyzing LLVM comes from inlining
defensively-written code in contexts where more aggressive assumptions are
implicitly made. This problem is not unique to C++, but it is exacerbated by
the higher proportion of code that lives in header files in C++.)

The eventual goal is to be comfortable enough with C++ support (and simple
Objective-C support) to advance to -analyzer-ipa=inlining as the default
behavior. See the IPA design notes for more details.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a7afeb040416c0eaac19b92db914913a788044f5 21-Aug-2012 Chad Rosier <mcrosier@apple.com> [driver] Add support for the --param ssp-buffer-size= driver option.
PR9673


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162285 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0a7dd788dbef975f35f273c7ab913f480f7edd60 21-Aug-2012 John McCall <rjmccall@apple.com> Screw around with ObjCRuntime some more, changing the
diagnostics for bad deployment targets and adding a few
more predicates. Includes a patch by Jonathan Schleifer
to enable ARC for ObjFW.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162252 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f23e8d2b928b0baa361dbf34df10862a5bcd01c4 08-Aug-2012 Dylan Noblesmith <nobled@dreamwidth.org> Preprocessor: fix __OPTIMIZE_SIZE__ and -Oz

Add some tests for __OPTIMIZE_SIZE__ and __NO_INLINE__,
removing the superfluous copies in the target-specific
tests, since it's target-independent.

This uncovered a bug in the handling of -Oz: it would
attempt to store the value 2 in the 1-bit bitfield OptimizeSize,
leaving a value of 0 and never defining __OPTIMIZE_SIZE__.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161495 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e1ce783708b65eaa832ffad03d239264046dd0eb 31-Jul-2012 Jordan Rose <jordan_rose@apple.com> [analyzer] Turn -cfg-add-initializers on by default, and remove the flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161060 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
171af64ef10ae816ed2a4f15f5d17aca1d71769f 31-Jul-2012 Alexander Kornienko <alexfh@google.com> Added -ast-list option to dump filterable AST decl node names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161040 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e34a052d642ba7830174b1a51787251d7f704f80 26-Jul-2012 Alexander Kornienko <alexfh@google.com> Added -ast-dump-filter option to clang -cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160784 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d256f8673bf2499f57e0f40aab30ff243d576c17 21-Jul-2012 Chad Rosier <mcrosier@apple.com> Rename -fms-inline-asm to -fenable-experimental-ms-inline-asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160590 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
89770e5640dd5039569ecdc64c61acd9aa22cff9 20-Jul-2012 Chad Rosier <mcrosier@apple.com> Add the mechanics for -fms-inline-asm. No easy way to test at this time.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160580 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
455e72e7625a8f87c2c302d8d82baee5c111e094 19-Jul-2012 Bob Wilson <bob.wilson@apple.com> Define __FINITE_MATH_ONLY__ based on -ffast-math and -ffinite-math-only.

This macro was being unconditionally set to zero, preceded by a FIXME comment.
This fixes <rdar://problem/11845441>. Patch by Michael Gottesman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
198871cc90375246d8692680467ff6e810edac36 12-Jul-2012 Tanya Lattner <tonic@nondot.org> Add OpenCL metadata for kernel arg names. This output is controlled via a flag as noted in the OpenCL Spec.
Includes a test case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160092 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c9686716d2ceb5518178dca98670ec34c472a1be 06-Jul-2012 Lang Hames <lhames@gmail.com> Add -ffp-contract = { fast | on | off } command line option support.

This flag sets the 'fp-contract' mode, which controls the formation of fused
floating point operations. Available modes are:

- Fast: Form fused operations anywhere.
- On: Form fused operations where allowed by FP_CONTRACT. This is the default
mode.
- Off: Don't form fused operations (in future this may be relaxed to forming
fused operations where it can be proved that the result won't be
affected).

Currently clang doesn't support the FP_CONTRACT pragma, so the 'On' and 'Off'
modes are equivalent.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8f4783c6a5ae1e95aeb58b41da9707310e60ab5b 02-Jul-2012 Douglas Gregor <dgregor@apple.com> Reduce default template instantiation depth to 512; we're blowing out
the stack too often with 1024. Fixes <rdar://problem/11678534>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159573 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d99ef536b241071b6f4c01db6525dc03242ac30b 02-Jul-2012 Dmitri Gribenko <gribozavr@gmail.com> Add a new libclang completion API to get brief documentation comment that is
attached to a declaration in the completion string.

Since extracting comments isn't free, a new code completion option is
introduced.

A new code completion option that enables including brief comments
into CodeCompletionString should be a, err, code completion option.
But because ASTUnit caches global declarations during parsing before
even completion consumer is created, the option is duplicated as a
translation unit option (in both libclang and ASTUnit, like the option
to cache code completion results).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159539 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
de981f3ff163bc9ec69e4c5e7316e94276412993 28-Jun-2012 Hans Wennborg <hans@hanshq.net> Add -ftls-model command-line flag.

This allows for setting the default TLS model. (PR9788)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159336 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
246b6aa6763de8c617d564ef33123a8f3293a80e 26-Jun-2012 Richard Trieu <rtrieu@google.com> Add template type diffing to Clang. This feature will provide a better
comparison between two templated types when they both appear in a diagnostic.
Type elision will remove indentical template arguments, which can be disabled
with -fno-elide-type. Cyan highlighting is applied to the differing types.

For more formatting, -fdiagnostic-show-template-tree will output the template
type as an indented text tree, with differences appearing inline. Template
tree works with or without type elision.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159216 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
260611a32535c851237926bfcf78869b13c07d5b 20-Jun-2012 John McCall <rjmccall@apple.com> Restructure how the driver communicates information about the
target Objective-C runtime down to the frontend: break this
down into a single target runtime kind and version, and compute
all the relevant information from that. This makes it
relatively painless to add support for new runtimes to the
compiler. Make the new -cc1 flag, -fobjc-runtime=blah-x.y.z,
available at the driver level as a better and more general
alternative to -fgnu-runtime and -fnext-runtime. This new
concept of an Objective-C runtime also encompasses what we
were previously separating out as the "Objective-C ABI", so
fragile vs. non-fragile runtimes are now really modelled as
different kinds of runtime, paving the way for better overall
differentiation.

As a sort of special case, continue to accept the -cc1 flag
-fobjc-runtime-has-weak, as a sop to PLCompatibilityWeak.

I won't go so far as to say "no functionality change", even
ignoring the new driver flag, but subtle changes in driver
semantics are almost certainly not intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158793 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5e94d6fa2e1d5ca606e060406adee13b96849f2a 20-Jun-2012 Tanya Lattner <tonic@nondot.org> Extend the support for cl-std to include 1.2.
Add error checking for the static qualifier which is now allowed in certain situations for OpenCL 1.2. Use the CL version to turn on this feature.
Added test case for 1.2 static storage class feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8af669f2f1d92436fe6dc43144bb084a620e7516 19-Jun-2012 Rafael Espindola <rafael.espindola@gmail.com> Add a -fuse-init-array option to cc1 and map to the UseInitArray target
option. On the driver, check if we are using libraries from gcc 4.7 or newer
and if so pass -fuse-init-array to the frontend.
The crtbegin*.o files in gcc 4.7 no longer call the constructors listed in
.ctors, so we have to use .init_array.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158694 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f4205e12cede5db17f47b31471852bb4a1f27533 19-Jun-2012 Tanya Lattner <tonic@nondot.org> Add language std for OpenCL 1.1 and 1.2.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158686 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f1492f970c7c6eb85dc18f13fb864b185bed1d23 14-Jun-2012 David Blaikie <dblaikie@gmail.com> Support -frewrite-includes as an option while preprocessing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
60ad16b7e24cdb88c577c107b69da85458000858 14-Jun-2012 David Blaikie <dblaikie@gmail.com> Rename -rewrite-includes to -frewrite-includes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158458 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f122a138e39dbb29162abfa9a3d44091d8efa7af 13-Jun-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -isystem-prefix and -ino-system-prefix arguments, which can be used to
override whether headers are system headers by checking for prefixes of the
header name specified in the #include directive.

This allows warnings to be disabled for third-party code which is found in
specific subdirectories of include paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7ed25df166c68a3d67f0f05b0b7dd802c57adfb8 11-Jun-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Const'ify CompilerInvocation::toArgs().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158298 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8c0b3787e7ccc7978b42dfbb84da2b802c743a5d 06-Jun-2012 David Blaikie <dblaikie@gmail.com> Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives.

Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
def18494b97f554ea0d95db75627c3e77b74307f 22-May-2012 Nuno Lopes <nunoplopes@sapo.pt> wire -fbounds-checking to the new LLVM bounds checking pass

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157262 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b3198a841e7f356f171f1e11faff014b2deb1eb8 09-May-2012 Nuno Lopes <nunoplopes@sapo.pt> add -fbounds-checking option.
When enabled, clang generates bounds checks for array and pointers dereferences. Work to follow in LLVM's backend.

OK'ed by Chad; thanks for the review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156431 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fd00eecad6fa5400cf37269d84361a0551d0e6d3 04-May-2012 Alexey Samsonov <samsonov@google.com> This patch adds a new Clang compiler flag "-gline-tables-only".
It reduces the amount of emitted debug information:
1) DIEs in .debug_info have types DW_TAG_compile_unit, DW_TAG_subprogram,
DW_TAG_inlined_subroutine (for opt builds) and DW_TAG_lexical_block only.
2) .debug_str contains only function names.
3) No debug data for types/namespaces/variables is emitted.
4) The data in .debug_line is enough to produce valid stack traces with
function names and line numbers.

Reviewed by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156160 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bfd7a525bcf372004787cb641b8c1566b9e8aba5 01-May-2012 James Molloy <james.molloy@arm.com> Unify Options.td and CC1Options.td, in a first step towards unifying the serialization logic in Frontend and Driver.

Reviewed by Eric, Doug and Chandler, and here: http://llvm.org/reviews/r/7/



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3a70cd6e1cc414856e41ce5509aa61c89bf472dc 27-Apr-2012 Alexey Samsonov <samsonov@google.com> Use enum to set debug info size generated by Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155697 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
105047124ca8ccc27e4fa48ae8af8bb472c57648 13-Apr-2012 Douglas Gregor <dgregor@apple.com> Remove the -cc1-level option "-pubnames-dump". Such things should stay
out of the tree and use the tooling infrastructure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154668 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
561d62280aecff3168097086425a7da0442d0de4 09-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Revert r154321, pending more discussion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154327 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
649ee3fec12dcf7167630ff88087ad116e9eefa6 09-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Add -fobjc-trace to emit a call before and after each Objective-C message send
for hooking in code flow visualisation applications.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154321 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5e219cf7f896873c1c1e64b9e87a7dade99debba 08-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Teach Clang about PIE compilations. This is the first step of PR12380.

First, this patch cleans up the parsing of the PIC and PIE family of
options in the driver. The existing logic failed to claim arguments all
over the place resulting in kludges that marked the options as unused.
Instead actually walk all of the arguments and claim them properly.

We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the
last one on the commandline. Previously there were lots of ordering bugs
that could creep in due to the nature of the parsing. Let me know if
folks would like weird things such as "-fPIE -fno-pic" to turn on PIE,
but disable full PIC. This doesn't make any sense to me, but we could in
theory support it.

Options that seem to have intentional "trump" status (-static, -mkernel,
etc) continue to do so and are commented as such.

Next, a -pie-level flag is threaded into the frontend, rigged to
a language option, and handled preprocessor, setting up the appropriate
defines. We'll now have the correct defines when compiling with -fpie.

The one place outside of the preprocessor that was inspecting the PIC
level (as opposed to the relocation model, which is set and handled
separately, yay!) is in the GNU ObjC runtime. I changed it to exactly
preserve existing behavior. If folks want to change its behavior in the
face of PIE, they can do that in a separate patch.

Essentially the only functionality changed here is the preprocessor
defines and bug-fixes to the argument management.

Tests have been updated and extended to test all of this a bit more
thoroughly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154291 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b47dbcbc12430fdf3e5a5b9f59cdec5480e89e75 28-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Enable retry exhausted without inlining by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153591 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
82fe6aea407a5a09a6131452ce622087ba83880d 28-Mar-2012 Chandler Carruth <chandlerc@gmail.com> Move the emission of strict enum range metadata behind a flag (the same
flag as GCC uses: -fstrict-enums). There is a *lot* of code making
unwarranted assumptions about the underlying type of enums, and it
doesn't seem entirely reasonable to eagerly break all of it.

Much more importantly, the current state of affairs is *very* good at
optimizing based upon this information, which causes failures that are
very distant from the actual enum. Before we push for enabling this by
default, I think we need to implement -fcatch-undefined-behavior support
for instrumenting and trapping whenever we store or load a value outside
of the range. That way we can track down the misbehaving code very
quickly.

I discussed this with Rafael, and currently the only important cases he
is aware of are the bool range-based optimizations which are staying
hard enabled. We've not seen any issue with those either, and they are
much more important for performance.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5903a373db3d27794c90b25687e0dd6adb0e497d 27-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Add an option to re-analyze a dead-end path without inlining.

The analyzer gives up path exploration under certain conditions. For
example, when the same basic block has been visited more than 4 times.
With inlining turned on, this could lead to decrease in code coverage.
Specifically, if we give up inside the inlined function, the rest of
parent's basic blocks will not get analyzed.

This commit introduces an option to enable re-run along the failed path,
in which we do not inline the last inlined call site. This is done by
enqueueing the node before the processing of the inlined call site
with a special policy encoded in the state. The policy tells us not to
inline the call site along the path.

This lead to ~10% increase in the number of paths analyzed. Even though
we expected a much greater coverage improvement.

The option is turned off by default for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153534 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
978fc9c485d21ee89b4f0bc77ce1ea55c65c7f12 27-Mar-2012 Douglas Gregor <dgregor@apple.com> Introduce a -cc1-level option -pubnames-dump, which simply dumps the
list of identifiers that that 'public' names at the end of the
translation unit, e.g., defined macros or identifiers with top-level
names, in sorted order. Meant to support <rdar://problem/10921596>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
dccb9bb102adf6ad89ede2f4930fb570c77243b9 26-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Driver: Factor string vector push_back into a helper class and optimize it.

Due to lack of move semantics we would create a temporary std::string from the
string literal, copy it into the vector and discard the temporary. This leads
to massive code bloat, optimizing it saves 50k on i386-linux-Release+Asserts.

While there add a two-element overload for push_back, simplifying code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fc055f943d154c9b7463f43a3b59e093723362c9 15-Mar-2012 Chad Rosier <mcrosier@apple.com> [frontend] Fix how the frontend handles -fno-inline. AFAIK clang now matches
the behavior of gcc with respect to the -fno-inline and -fno-inline-functions
flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152861 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8fbe3855db0c341964bb550e13659505efe06c43 15-Mar-2012 Chad Rosier <mcrosier@apple.com> [frontend] Add support for disabling the "inline" keyword using
-fno-inline-functions.

This behaves much like -fno-inline in gcc, but based on a discussion with
Daniel it was decided that -fno-inline-functions should subsume -fno-inline.
Please speak up if you object. The -fno-inline flag remains ignored.
Final part of rdar://10972766



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2dec85b21822f950bf6035640c496ad835e11728 13-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] Parse diagnostic args in the driver.

Previously, only diagnostics thrown by the cc1 process were
actually honoring the diagnostic options given on the command line,
like -Werror.

Reuse the existing code in Frontend currently used for cc1,
adjusting it to not interpret -Wl, linker flags as warnings.

Also fix a faulty test exposed by this change.
It wasn't actually testing anything, and was giving this warning:

clang-3: warning: argument unused during compilation: '-verify'

Which -Werror didn't turn into an error because it was output
by the driver, not the cc1 process, and diagnostic options
weren't parsed by the driver. And you couldn't see the warning
when running the test suite.

Fixes PR12181.
Patch by Dylan Noblesmith <nobled@dreamwidth.org>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152660 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3fd5f370a28552976c52e76c3035d79012d78dda 09-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Add support for NoRedundancy inlining mode.

We do not reanalyze a function, which has already been analyzed as an
inlined callee. As per PRELIMINARY testing, this gives over
50% run time reduction on some benchmarks without decreasing of the
number of bugs found.

Turning the mode on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7b14026640d76145c4a9a9ac3b2e647bb49651f8 09-Mar-2012 Daniel Dunbar <daniel@zuster.org> [Basic] Rename LangOptions::NoInline to NoInlineDefine, to make things a bit
more obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152408 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
66253352131e3e7a22b3bfd0e180607aa2bfb988 09-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Rework inlining related command line options.
- Remove -analyzer-inline-call.
- Add -analyzer-ipa=[none|inlining]
- Add -analyzer-inlining-mode to allow experimentation for
different performance tuning methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152351 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e286d9b8b19b24da5158ffeb17a7de03644f1009 08-Mar-2012 Bob Wilson <bob.wilson@apple.com> Workaround module test failures by removing the version info from module hashes.

PR12196: The module hash strings are not actually hashing the compiler version
string; the entire version string is being included in the hash. Depending on
the module cache directory name, that can lead to failures where the path
names become too long. As a temporary workaround, just remove the version
string from the hash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
634a4b1b045b13e7ddfa57934cf2b85d4348f77f 06-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] What was implemented in r152130 was actually -fno-inline-functions, not
-fno-inline.
Part of rdar://10972766


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152145 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
30660a898545416f0fea2d717f16f75640001e38 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add new code migrator support for migrating existing Objective-C code to use
the new Objective-C NSArray/NSDictionary/NSNumber literal syntax.

This introduces a new library, libEdit, which provides a new way to support
migration of code that improves on the original ARC migrator. We now believe
that most of its functionality can be refactored into the existing libraries,
and thus this new library may shortly disappear.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
250008b4678b19ef80866702e300bb4e53d9ff2d 06-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] Add support for -fno-inline.
rdar://10972766


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152130 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8235f9c9c8b3d1737d1c6bd57f7ba3f616b92392 02-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Bound the size of the functions being inlined + provide
command line options for inlining tuning.

This adds the option for stack depth bound as well as function size
bound.

+ minor doxygenification

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
278f1f8d9557babb22b966379dd89039f3f8a440 01-Mar-2012 Anna Zaks <ganna@apple.com> [analyzer] Turn inlining on by default for better testing exposure.

Fix a test, which was most likely an unintended recursive call.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151848 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3c93122d31924d6d4a6265f36a0c98a164002da6 01-Mar-2012 Kostya Serebryany <kcc@google.com> Add a flag -fthread-sanitizer.
This flag enables ThreadSanitizer instrumentation committed to llvm as r150423.
The patch includes one test for -fthread-sanitizer and one similar test for -faddress-sanitizer.
This patch does not modify the linker flags (as we do it for -faddress-sanitizer) because the run-time library is not yet
committed and it's structure in compiler-rt is not 100% clear.
The users manual wil be changed in a separate commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151846 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
81fb169f42769e02c7425b23885a261c025fd5e6 27-Feb-2012 Anna Zaks <ganna@apple.com> [analyzer] Add -analyzer-stats, which hooks up LLVM stats tracking.

As in http://llvm.org/docs/ProgrammersManual.html#Statistic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151570 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c93dc7889644293e318e19d82830ea2acc45b678 20-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import IntrusiveRefCntPtr<> into clang namespace

The class name is long enough without the llvm:: added.
Also bring in RefCountedBase and RefCountedBaseVPTR.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150958 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ceb15656fbab9ee1da319afa4934b8f6a5964758 15-Feb-2012 David Blaikie <dblaikie@gmail.com> Remove the unuseful -fdiagnostics-show-name

This option was added in r129614 and doesn't have any use case that I'm aware
of. It's possible that external tools are using these names - and if that's
the case we can certainly reassess the functionality, but for now it lets us
shave out a few unneeded bits from clang.

Move the "StaticDiagNameIndex" table into the only remaining consumer, diagtool.
This removes the actual diagnostic name strings from clang entirely.

Reviewed by Chris Lattner & Ted Kremenek.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e6cc51d9d7100d2d3e3ba48b476ab86fa1feca82 06-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Invalid O levels on the command line no longer have a confusing error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6f42b62b6194f53bcbc349f5d17388e1936535d7 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import OwningPtr<> into clang namespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
50a9a12d4f7387bcff3213d4b56e74bab9f4f5d2 04-Feb-2012 Sean Callanan <scallanan@apple.com> Clang has existing support for debuggers that
want to provide "po"-like functionality which
treats the result of an expression implicitly as
"id" (if it is not otherwise known) and prints
it as an Objective-C object.

This has in the past been gated by the
"DebuggerSupport" language option, but that is
too general. Debuggers also provide other commands
like "print" that do not make any assumptions
about whether the object is an Objective-C object.

This patch makes the assumption conditional on a
new language option: DebuggerCastResultToId. I
have also made corresponding modifications to the
testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149735 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
71fd6cc843719cab528a5df0899ad3d15cb9297f 03-Feb-2012 Bob Wilson <bob.wilson@apple.com> Fix -ftrap-function fallout from llvm r145714. <rdar://problem/10799325>

That llvm change removed the -trap-func backend option, so that using
-ftrap-function with clang would cause the backend to complain. Fix it
by adding the trap function name to the CodeGenOptions and passing it through
to the TargetOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149679 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
773303a505c23d73da624f1e6abcf41a393dad2b 03-Feb-2012 Douglas Gregor <dgregor@apple.com> Rename -dependency-graphviz to -dependencncy-dot

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149645 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c69a181049ab52da29f8f69316a34c90c3ea3b8e 02-Feb-2012 Douglas Gregor <dgregor@apple.com> Introduce a -cc1 option "-dependency-graphviz" that determines header
dependencies and outputs them in GraphViz format.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149575 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4188760f6bb20f91c6883dffd89204419f852dee 29-Jan-2012 John McCall <rjmccall@apple.com> Complain about attempts to use 'protected' visibility on targets
like Darwin that don't support it. We should also complain about
invalid -fvisibility=protected, but that information doesn't seem
to exist at the most appropriate time, so I've left a FIXME behind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149186 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bbdfad581fa300fa0d162d968ec14de3c95fc760 26-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> objc-arc: introduce -no-finalize-removal which in gc mode,
leaves "finalize' behind and in arc mode, does not
include it. This allows the migrated source to be compiled
in both gc and arc mode. // rdar://10532441


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149079 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
453dbcbe30093fbf947a0bec2fbd46e9694eafe9 26-Jan-2012 Douglas Gregor <dgregor@apple.com> Extend the ExternalASTSource interface to allow the AST source to
provide the layout of records, rather than letting Clang compute
the layout itself. LLDB provides the motivation for this feature:
because various layout-altering attributes (packed, aligned, etc.)
don't get reliably get placed into DWARF, the record layouts computed
by LLDB from the reconstructed records differ from the actual layouts,
and badness occurs. This interface lets the DWARF data drive layout,
so we don't need the attributes preserved to get the answer write.

The testing methodology for this change is fun. I've introduced a
variant of -fdump-record-layouts called -fdump-record-layouts-simple
that always has the simple C format and provides size/alignment/field
offsets. There is also a -cc1 option -foverride-record-layout=<file>
to take the output of -fdump-record-layouts-simple and parse it to
produce a set of overridden layouts, which is introduced into the AST
via a testing-only ExternalASTSource (called
LayoutOverrideSource). Each test contains a number of records to lay
out, which use various layout-changing attributes, and then dumps the
layouts. We then run the test again, using the preprocessor to
eliminate the layout-changing attributes entirely (which would give us
different layouts for the records), but supplying the
previously-computed record layouts. Finally, we diff the layouts
produced from the two runs to be sure that they are identical.

Note that this code makes the assumption that we don't *have* to
provide the offsets of bases or virtual bases to get the layout right,
because the alignment attributes don't affect it. I believe this
assumption holds, but if it does not, we can extend
LayoutOverrideSource to also provide base offset information.

Fixes the Clang side of <rdar://problem/10169539>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
61d679ab2831b161c857cf3f974312fbd4ef1efd 26-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce 3 new fixit options:

-fixit-recompile
applies fixits and recompiles the result
-fixit-to-temporary
applies fixits to temporary files
-fix-only-warnings">,
applies fixits for warnings only, not errors

Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits
without touching the original sources.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b5c6babd3d8e0233b8ea5a4eb1e2700e30c0d396 25-Jan-2012 Fariborz Jahanian <fjahanian@apple.com> arc migrator: Provide infrastructure to add options
specific to migrator. Use its first option to
warn migrating from GC to arc when
NSAllocateCollectable/NSReallocateCollectable is used.
// rdar://10532541


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148887 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1db772bd68502e0dabbd8efeb7f7c64a4ab2e37a 23-Jan-2012 Nick Lewycky <nicholas@mxc.ca> Add support for -fno-optimize-sibling-calls. Currently only implemented in the
X86 backend in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3026348bd4c13a0f83b59839f64065e0fcbea253 20-Jan-2012 David Blaikie <dblaikie@gmail.com> More dead code removal (using -Wunreachable-code)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1f6b2b5c82b2d2d3935b0db76352a04e9877b73f 20-Jan-2012 Douglas Gregor <dgregor@apple.com> Extract the (InputKind, std::string) pair used to describe inputs to
the front end into its own class, FrontendInputFile, to make it easier
to introduce new per-input data. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148546 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
752c74d99b647710a495c2ff5f815c30a30c3264 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Add a "Modules" language option, which subsumes the previous
"AutoModuleImport" preprocessor option and is tied to -fmodules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147448 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c514a8a0eaa575cf46b038cc27fa1e4e8c22f89a 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Rename the command-line option for mapping #include/#import over to
module imports from -fauto-module-import to -fmodules. The new name
will eventually be used to enable modules, and the #include/#import
mapping is a crucial part of the feature.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147447 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
abf07a7fb669dcb74040eef948d61dfe3c59ff17 02-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Fix PR11685 by implementing -ffast-math and its various friends in the
Clang driver. This involves a bunch of silly option parsing code to try
to carefully emulate GCC's options. Currently, this takes a conservative
approach, and unless all of the unsafe optimizations are enabled, none
of them are. The fine grained control doesn't seem particularly useful.
If it ever becomes useful, we can add that to LLVM first, and then
expose it here.

This also fixes a few tiny bugs in the flag management around
-fhonor-infinities and -fhonor-nans; the flags now form proper sets both
for enabling and disabling, with the last flag winning.

I've also implemented a moderately terrifying GCC feature where
a language change is also provided by the '-ffast-math' flag by defining
the __FAST_MATH__ preprocessor macro. This feature is tracked and
serialized in the frontend but it isn't used yet. A subsequent patch
will add the preprocessor macro and tests for it.

I've manually tested that codegen appears to respect this, but I've not
dug in enough to see if there is an easy way to test codegen options w/o
relying on the particulars of LLVM's optimizations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a 23-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.

Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8fdb6dee2da0dee97d64fe12eda46fb318414de9 23-Dec-2011 Dylan Noblesmith <nobled@dreamwidth.org> Let CompilerInvocation initialization indicate failure

This fixes the FIXMEs in ParseAnalyzeArgs. (Also a
precursor to moving the analyzer into an AST plugin.)

For consistency, do the same with AssemblerInvocation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147218 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
08d6e032a2a0a8656d12b3b7b93942987bb12eb7 16-Dec-2011 Richard Smith <richard-llvm@metafoo.co.uk> C++11 constexpr: Add note stacks containing backtraces if constant evaluation
fails within a call to a constexpr function. Add -fconstexpr-backtrace-limit
argument to driver and frontend, to control the maximum number of notes so
produced (default 10). Fix APValue printing to be able to pretty-print all
APValue types, and move the testing for this functionality from a unittest to
a -verify test now that it's visible in clang's output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9f6d068b29ea2f6276f1105c71d9e768201f2b88 14-Dec-2011 Chad Rosier <mcrosier@apple.com> Per discussion on the list, remove BitcodeVerify pass to reimplement as a free function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ff7892758f1e46221b552486c1e329db92147ebc 13-Dec-2011 Chad Rosier <mcrosier@apple.com> Add frontend flags to enable bitcode verifier pass.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146441 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9631939f82c0eaa6fb3936a0ce58a41adfbc9011 12-Dec-2011 Tony Linthicum <tlinth@codeaurora.org> Hexagon backend support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
001f628a693960380e37c2b58a1009da77d7e425 10-Dec-2011 Daniel Dunbar <daniel@zuster.org> Driver: Handle -f{no-}honor-infinities, -f{no-}honor-nans, and
-ffinite-math-only.
- No test case yet, I don't know how to construct a situation where this
matters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4e785c908ae01519d3592eae2828e2cc94fb02eb 06-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Stack realignment is a tristate. Add -mno-stackrealign to turn off all stack
realignment, even with locals with alignment exceeding the ABI guarantee.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145909 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e9d11dbfe1f3286c5f8a2f2fc8ac759f63890655 06-Dec-2011 Joerg Sonnenberger <joerg@bec.de> Add -mstack-alignment=X and fix -mstackrealign handling now that the
backend options are gone.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6649014b792f8a4b1bc1e8be8f844a72220af508 29-Nov-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -emit-module option, which emitted a module by parsing a
source file (e.g., a header). Immediately steal this useful option
name for building modules from a module map file.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145444 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
85224ae68ab9c9df5dd8410a1b7188b4d64f889e 29-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Silence GCC warnings, RefCountedBase is meant to be default-initialized here.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145396 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4c7ce36a761b65a659aa6c4728a318e5d06f5f95 26-Nov-2011 Rafael Espindola <rafael.espindola@gmail.com> Set __OPTIMIZE_SIZE__ on -Os and -Oz. This matches gcc's behaviour on both OS X
and linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b61968857fd2c6579b4dcd7bad65736e89d21185 22-Nov-2011 Kostya Serebryany <kcc@google.com> implement __has_feature(address_sanitizer); also use LangOpts.AddressSanitizer instead of CodeGenOpts.AddressSanitizer

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145054 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c18c42345636e2866fed75c7e434fb659d747672 21-Nov-2011 Richard Smith <richard-llvm@metafoo.co.uk> Add driver arguments -ftemplate-depth=N and -fconstexpr-depth=N, with the same
semantics and defaults as the corresponding g++ arguments. The historical g++
argument -ftemplate-depth-N is kept for compatibility, but modern g++ versions
no longer document that option.

Add -cc1 argument -fconstexpr-depth N to implement the corresponding
functionality.

The -ftemplate-depth=N part of this fixes PR9890.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8a0c5c2ec5c5496cfb01d2c86bd50991866a7356 18-Nov-2011 Ted Kremenek <kremenek@apple.com> Refine placement of LangOptions object in CompilerInvocation by adding a new baseclass CompilerInvocationBase with a custom copy constructor. This ensures that whenever the CompilerInvocation object's copy constructor is used we always clone the LangOptions object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144973 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d3b74d9ca4f239a7a90ad193378c494306c57352 18-Nov-2011 Ted Kremenek <kremenek@apple.com> Make 'LangOptions' in CompilerInvocation a heap-allocated, reference counted object. I discovered that llvm::RefCountedBase<T> has
a bug where the reference count is copied in the copy constructor, which means that there were cases when the CompilerInvocation
objects created by ASTUnit were actually leaked. When I fixed that bug locally, it showed that a whole bunch of code assumed
that the LangOptions object that was part of CompilerInvocation was still alive. By making it heap-allocated and reference counted,
we can keep it around after the CompilerInvocation object goes away.

As part of this change, change CompilerInvocation:getLangOptions() to return a pointer, acting as another clue that this
object may outlive the CompilerInvocation object.

This commit doesn't fix the CompilerInvocation leak itself. That will come when I commit the fix to llvm::RefCountedBase<T> to
mainline LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144930 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1b4eca67e073f0beefb9924cbe6c65427869f1fa 16-Nov-2011 Kostya Serebryany <kcc@google.com> Add -f[no-]address-sanitizer flag

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144800 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
db1cde7dc7bb3aaf48118bd9605192ab94a93635 16-Nov-2011 Douglas Gregor <dgregor@apple.com> Add support for building a module from a module map to the -cc1
interface. This is currently limited to modules with umbrella
headers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144736 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b86b8dc7ef89405205f94635c1073cdb1a7093eb 15-Nov-2011 Douglas Gregor <dgregor@apple.com> Add a -cc1-level option -fmodule-name=<name>, which will be used when
building modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
07643086c6460095855573902d66aae1b08a6182 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Rip out one of the features I added for the driver-include-management.
We don't actually need a separate flag for non-sysrooted paths as the
driver has to manage the sysroot anyways. The driver is not infrequently
adding paths to the header search based on their existence on the
filesystem. For that, it has to add the sysroot anyways, we should pass
it on down to CC1 already joined. More importantly, the driver cannot in
all cases distinguish between sysrooted paths and paths that are
relative to the Clang binary's installation directory. Essentially, we
always need to ignore the system root for these internal header search
options. It turns out in most of the places we were already providing
the system root in the driver, and then another one in CC1 so this fixes
several bugs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
103accc00cf1c9a09790ef487a9fb89ec0750fd7 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix a significant oversight in my move of MSVC includes to the driver:
actually manage the builtin header file includes as well as the system
ones.

This one is actually debatable whether it belongs in the driver or not,
as the builtin includes are really an internal bit of implementation
goop for Clang. However, they must be included at *exactly* the right
point in the sequence of header files, which makes it essentially
impossible to have this be managed by the Frontend and the rest by the
Driver. I have terrible ideas that would "work", but I think they're
worse than putting this in the driver and making the Frontend library
even more ignorant of the environment and system on which it is being
run.

Also fix the fact that we weren't properly respecting the flags which
suppress standard system include directories.

Note that this still leaves all of the Clang tests which run CC1
directly and include builtin header files broken on Windows. I'm working
on a followup patch to address that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143801 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ac2bc4d220a6263be96b943e9162f4a11149e26d 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add two flags to the CC1 layer that I was hoping to avoid. We need to
encode the *exact* semantics which the header search paths internally
built by the Frontend layer have had, which is both non-user-provided,
and at times adding the implicit extern "C" bit to the directory entry.

There are lots of CC1 options that are very close, but none do quite
this, and they are all already overloaded for other purposes. In some
senses this makes the command lines more clean as it clearly indicates
which flags are exclusively used to implement internal detection of
"standard" header search paths.

Lots of the implementation of this is really crufty, due to the
surrounding cruft. It doesn't seem worth investing lots of time cleaning
this up as it isn't new, and hopefully *lots* of this code will melt
away as header search inside of the frontend becomes increasingly
trivial.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143798 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
033be8bd33e0f84db8158771e13528e071563b73 04-Nov-2011 Devang Patel <dpatel@apple.com> Enable -flimit-debug-info by default. Now, clang lazily emits debug info for structs. Original behavior can be restored using -fno-limit-debug-info.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143733 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
21a25167b8279df3d8f889d041a4fd98733d3c27 02-Nov-2011 Douglas Gregor <dgregor@apple.com> Fix various minor issues find via unreachable code warnings, from
Ahmed Charles!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143569 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
19bda3ad8b5d37e505214e82fab1d0a0bf00f0fd 02-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add an option to emulate the strange Apple gcc behavior of #pragma pack.

<rdar://problem/10374763>



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143527 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5d8b9548420e67f1bf45b7bbc1cf9fb86e9e4505 01-Nov-2011 Sebastian Pop <spop@codeaurora.org> rename getHostTriple into getDefaultTargetTriple in clang



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
22a7dfea585703d6755db69b83e29a0e6ee10369 30-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for lazily linking bitcode files (using a new
-mlink-bitcode-file flag), and more generally llvm::Modules, before
running optimisations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143314 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7800212ef29be314d55814e8dcc568ff8beed106 29-Oct-2011 Ted Kremenek <kremenek@apple.com> Start work on SerializedDiagnosticPrinter, a new DiagnosticConsumer that serializes out the diagnostics for a given translation unit to a bit code file. This is a WIP.

The motivation for this new DiagnosticConsumer is to provide a way for tools invoking the compiler
to get its diagnostics via a libclang interface, rather than textually parsing the compiler output.
This gives us flexibility to change the compiler's textual output, but have a structured data format
for clients to use to get the diagnostics via a stable API.

I have no tests for this, but llvm-bcanalyzer so far shows that the emitted file is well-formed.

More work to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143259 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0bb935c5e75250f9cab8efa7a95ebdd534c11602 24-Oct-2011 Douglas Gregor <dgregor@apple.com> Make -fms-compatibility imply -fms-extensions. Fixes PR11204.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7c4fd9121f5885096fd3258d20a984e3f08f8603 21-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Take DW_AT_comp_dir from $PWD when it's present and starts with a '/'. This is
closer to what GCC does, except that GCC also checks that the inodes for $PWD
and '.' match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142633 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
024f4be866d13dd2b0ec062e694a62ca84c37191 18-Oct-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Support -iframework.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142418 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ea523d73a6de06f828952a02f5ff86e4cc631695 18-Oct-2011 Nick Lewycky <nicholas@mxc.ca> Wire up support for the controlling the extended dwarf .file directive. With
r142300 but not this patch, clang -S may emit .s files that assemblers other
than llvm-mc can't parse.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
05edf668f0984bfa2994ddc8bb7b78d9fb24cf11 17-Oct-2011 Douglas Gregor <dgregor@apple.com> When building a module, use the macro definitions on the command line
as part of the hash rather than ignoring them. This means we'll end up
building more module variants (overall), but it allows configuration
macros such as NDEBUG to work so long as they're specified via command
line. More to come in this space.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a268fc0f2229eb132ebc8501b140093aeb5516bf 11-Oct-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Replace -nostdinc by -nostdsysteminc (which is just system include
paths). The -nostdinc behavior is now -nostdsysteminc + -nobuiltininc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141691 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c91562ce427a88f4aa4d6c2b374f6f0937f5b6fc 10-Oct-2011 Francois Pichet <pichet2000@gmail.com> Revert r140009, about disabling clang's builtin in -fms-compatibility mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ae57eadbc1a923efb72924765445db915cc23a9b 10-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add driver/frontend support for precompiled headers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141516 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d51e43af0b3a6897b971f316c4de2035ec82d1f2 06-Oct-2011 Peter Collingbourne <peter@pcc.me.uk> CUDA: add -fcuda-is-device flag

This frontend-only flag is used by the IR generator to determine
whether to filter CUDA declarations for the host or for the device.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141301 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
88934e85f81abdc4fb5202325252be3bcab5ebf0 05-Oct-2011 Daniel Dunbar <daniel@zuster.org> Driver & AST: Implement support for -fpack-struct and -fpack-struct= command
line options.
- <rdar://problem/10120602>, PR9631

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141211 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d1e40d5389a4382cbebc97d54792f41ee0414af4 02-Oct-2011 John McCall <rjmccall@apple.com> Make -fobjc-nonfragile-abi the -cc1 default, since it's the
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140957 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d30952838421ddfb9f7e346b2ba8213889a5f789 30-Sep-2011 Anna Zaks <ganna@apple.com> [analyzer] Add -analyzer-purge option which can take on multiple values, remove -analyzer-purge=none. (Small refactor as well: move the work of constructing AnalysisManager from the callers to the class itself.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d6471f7c1921c7802804ce3ff6fe9768310f72b9 26-Sep-2011 David Blaikie <dblaikie@gmail.com> Rename Diagnostic to DiagnosticsEngine as per issue 5397


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b219cfc4d75f0a03630b7c4509ef791b7e97b2c8 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Switch assert(0/false) llvm_unreachable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
47adebef0df6dce752fe9a45e9190e8005b5d07c 22-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Add support for CPATH and friends.

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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140341 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
37c31c2e050856f87efd652958352181e72e5dea 21-Sep-2011 Tobias Grosser <grosser@fim.uni-passau.de> In the OpenCL mode, the AltiVec mode must be off and checks must be strict

OpenCL is different from AltiVec in the way it supports vector literals. OpenCL
is strict with regards to semantic checks. For example, implicit conversions
and explicit casts between vectors of different types are disallowed.

Fixes PR10975. Submitted by: Anton Lokhmotov <Anton.lokhmotov@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140270 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9850ae1decf10021475bd5d15a6dad949ddd67c0 19-Sep-2011 Francois Pichet <pichet2000@gmail.com> Do not use builtin includes if -fms-compatibility is specified. Some MSVC header files have the same name as clang's builtins, this creates clash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140009 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
62ec1f2fd7368542bb926c04797fb07023547694 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.

Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
ae55608a29d61737b7c5390e2d1bb30ab8d5febb 17-Sep-2011 Francois Pichet <pichet2000@gmail.com> As per discussion with Doug Gregor on the IRC channel, introduce a new compiler switch: -fms-compatility.

Microsoft specific tweaking will now fall into 2 categories:

- fms-extension: Microsoft specific extensions that should never change the meaning of an otherwise well formed code. Currently map to LangOptions::Microsoft. (To be clearer, I am planning to change the name to LangOptions::MicrosoftExt).

- fms-compatibility: Really a MSVC emulation mode. Map to LangOptions::MicrosoftMode. Can change the meaning of an otherwise standard conformant program.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139978 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fba18aa8f2cd1994dc65e8cb9f4be201c560dc0b 16-Sep-2011 Douglas Gregor <dgregor@apple.com> Add an experimental flag -fauto-module-import that automatically turns
#include or #import direcctives of framework headers into module
imports of the corresponding framework module.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139860 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
531dcce3e5f5d5234520df7593e285d7dd007456 15-Sep-2011 Douglas Gregor <dgregor@apple.com> Eliminate the unused -create-module cc1-level option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139827 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
815759cb08d5b91e2585b200bcf20822e0d422ad 14-Sep-2011 Douglas Gregor <dgregor@apple.com> Encode the module hash in base-36, to reduce the length of the strings a bit

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139696 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6e975c4517958bcc11c834336d340797356058db 14-Sep-2011 Douglas Gregor <dgregor@apple.com> For modules, use a hash of the compiler version, language options, and
target triple to separate modules built under different
conditions. The hash is used to create a subdirectory in the module
cache path where other invocations of the compiler (with the same
version, language options, etc.) can find the precompiled modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139662 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e289d81369914678db386f6aa86faf8f178e245d 13-Sep-2011 Douglas Gregor <dgregor@apple.com> Switch LangOptions over to a .def file that describes header of the
language options. Use that .def file to declare the LangOptions class
and initialize all of its members, eliminating a source of annoying
initialization bugs.

AST serialization changes are next up.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9a6da6930644b4f2dbe4885b0eb4fc1274ff56a4 12-Sep-2011 Douglas Gregor <dgregor@apple.com> Introduce a cc1-level option to provide the path to the module cache,
where the compiler will look for module files. Eliminates the
egregious hack where we looked into the header search paths for
modules.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139538 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
13db5cfc4e5f03eb70efe0d227b53b8280f16161 09-Sep-2011 John McCall <rjmccall@apple.com> Treat the weak export of block runtime symbols as a deployment-target
feature akin to the ARC runtime checks. Removes a terrible hack where
IR gen needed to find the declarations of those symbols in the translation
unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139404 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
831c6313dfa36f297094cd593a9dd3cb60649362 27-Aug-2011 Douglas Gregor <dgregor@apple.com> Remove the -import-module option. It's no longer useful

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138681 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1b9060553221720152e12981109549e0a1d8e3a1 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Add -mglobal-merge/-mno-global-merge machine options to enable/disable merging of
globals during codegen.
Fixes <rdar://problem/10017909>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138612 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b5af843a20e237ad1a13ad66a867e200695b8c8e 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -chained-pch flag and all of the frontend and libclang options associated with it. Chained PCH is the only way to build a PCH file that includes another PCH file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138597 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
467dc88512b4ba4bb16e274ea3771dc1415d31da 26-Aug-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1 option "-emit-module", that creates a binary module
from the given source. -emit-module behaves similarly to -emit-pch,
except that Sema is somewhat more strict about the contents of
-emit-module. In the future, there are likely to be more interesting
differences.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138595 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1f7957d63ccbb9c14f852eb127144d27c40f7e8f 13-Aug-2011 Nico Weber <nicolasweber@gmx.de> Accept -x objc++-cpp-output as an alias for -x objective-c++-cpp-output

This is the ObjC++ version of r129201. It's for example needed to use
ccache with clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137560 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e735e2deb9e57d9b62c1258ee236ccfeba8e84b2 06-Aug-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Wire up -import-module to run ReadAST for each module loaded.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a4c7a4314ffbe402091695874e93d9b0a79c8099 29-Jul-2011 Ted Kremenek <kremenek@apple.com> Really remove FlatStoreManager and BasicStoreManager, this time from the driver. Also remove associated tests. Sorry for the messy commits; this is the result of a botched Git merge.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
65e02fa80e1c185f18e5f81cefc30d75383a7301 28-Jul-2011 Douglas Gregor <dgregor@apple.com> Introduce the "-index-header-map" option, to give special semantics
for quoted header lookup when dealing with not-yet-installed
frameworks. Fixes <rdar://problem/9824020>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136331 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5f9e272e632e951b1efe824cd16acb4d96077930 23-Jul-2011 Chris Lattner <sabre@nondot.org> remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
them into the clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135852 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7ee2049278b98d42709380054eb83f4952af1200 19-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Add some additional driver flags to optionally emit or save the pre-migration ARC errors.

-arcmt-migrate-emit-errors : Emits the pre-migration ARC errors but it doesn't affect anything else
-arcmt-migrate-report-output : Writes out the pre-migration ARC errors to the provided plist file

rdar://9791454

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135491 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
48218c60d6b53b7880917d1366ee716dec2145ca 13-Jul-2011 John McCall <rjmccall@apple.com> In debugger mode, make ObjC message sends to unknown selectors return
__unknown_anytype, and rewrite such message sends correctly.

I had to bite the bullet and actually add a debugger support mode for this
one, which is a bit unfortunate, but there really isn't anything else
I could imagine doing; this is clearly just debugger-specific behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bb52786da8d055568eef6e5694288c1258bc8c2a 12-Jul-2011 Peter Collingbourne <peter@pcc.me.uk> Implement -MG. Fixes PR9613

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134996 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
69325d5b7cfecf1b3128745efc33612aedf1b8b4 09-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.

This is a new mode of migration, where we avoid modifying the original files but
we emit temporary files instead.

<path> will be used to keep migration process metadata. Currently the temporary files
that are produced are put in the system's temp directory but we can put them
in the <path> if is necessary.

Also introduce new ARC migration functions in libclang whose only purpose,
currently, is to accept <path> and provide pairs of original file/transformed file
to map from the originals to the files after transformations are applied.

Finally introduce the c-arcmt-test utility that exercises the new libclang functions,
update arcmt-test, and add tests for the whole process.

rdar://9735086.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3bd21383f0d788e49af71c5d25255197ddb8a59b 08-Jul-2011 Jonathan D. Turner <jonathan.d.turner@gmail.com> Remove BoostCon-specific code from Clang. FWIW, I'm a fan of things like this living in a separate branch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134649 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
256a76e0b0e0c9e65a3122917d553ef10bc84d29 06-Jul-2011 John McCall <rjmccall@apple.com> Call objc_terminate() instead of abort() when a cleanup throws an
exception in Objective-C; in Objective-C++ we still use std::terminate().
This is only available in very recent runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134456 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9f084a3166b684573ba49df28fc5792bc37d92e1 06-Jul-2011 John McCall <rjmccall@apple.com> Change the driver's logic about Objective-C runtimes: abstract out a
structure to hold inferred information, then propagate each invididual
bit down to -cc1. Separate the bits of "supports weak" and "has a native
ARC runtime"; make the latter a CodeGenOption.

The tool chain is still driving this decision, because it's the place that
has the required deployment target information on Darwin, but at least it's
better-factored now.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134453 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5d9b6bf9de98a33427fc7a3beeca90a3002b4744 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Use existing -fcatch-undefined-behavior option,
replacing -freset-local-blocks. // rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134082 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1077e420b89c9541396135157f22a1eff6062edf 29-Jun-2011 Fariborz Jahanian <fjahanian@apple.com> Under a compiler flag, -freset-local-blocks,
wipe out stack blocks when they go out of scope.
// rdar://9227352


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134045 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5dd45f13dc4463f0c18b923fe6795ce55103301d 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Make InitHeaderSearch::AddPath and HeaderSearchOptions::AddPath consistent
use an "IgnoreSysRoot" argument. HeaderSearchOptions had been using the
opposite form with "IsSysRootRelative", which made for much confusion when
looking at true/false values in calls in AddPath. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
13c4f2144b35bda21746eb60ad90e52a9bd8dcda 21-Jun-2011 Bob Wilson <bob.wilson@apple.com> Fix the default libc++ header search path to be sysrooted. Radar 9639692.

The -cxx-isystem path is not prefixed with the sysroot directory, so it's
not a good way for the driver to set the system default C++ search path.
Instead, add -stdlib as a cc1 option and teach the frontend how to find the
headers. The driver can then just pass -stdlib through to "cc1".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133547 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e26bdb91b7e3912ffe895b78a446db94471a59dd 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> IRgen: Add a -fuse-register-sized-bitfield-access option, for testing.
- Changes bit-field access policy to try to use (aligned) register sized accesses.

The idea here is that by using larger accesses we expose more coalescing
potential to the backend when we have situations like adjacent bit-fields in the
same structure (which is common), and that the backend should be smart enough to
narrow the accesses down when no coalescing is done or when it is shown not to
be profitable.

--
$ clang -m32 -O3 -S -o - t.c
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movb (%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, (%eax)
movb 1(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 1(%eax)
movb 2(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 2(%eax)
movb 3(%eax), %cl
andb $-128, %cl
orb $1, %cl
movb %cl, 3(%eax)
popl %ebp
ret

$ clang -m32 -O3 -S -o - t.c -Xclang -fuse-register-sized-bitfield-access
_f0: ## @f0
pushl %ebp
movl %esp, %ebp
movl 8(%ebp), %eax
movl $-2139062144, %ecx ## imm = 0xFFFFFFFF80808080
andl (%eax), %ecx
orl $16843009, %ecx ## imm = 0x1010101
movl %ecx, (%eax)
popl %ebp
ret
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133532 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c3b9014c7236a15cf467662264b243a22c420312 21-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Add support for -Wa,--noexecstack when building from a non-assembly file. For
an assembly file it worked correctly, while for a .c file it would given an
error about how --noexecstack is not a supported argument to -Wa.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133489 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c2e70b46b686c8debb3020891a5593f298b053ae 18-Jun-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Remove '-arcmt-modify-in-memory', it turned out less useful than we hoped it would be.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133315 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8f0e8d22960d56f8390f4971e2c0f2f0a0884602 16-Jun-2011 John McCall <rjmccall@apple.com> The ARC Migration Tool. All the credit goes to Argyrios and Fariborz
for this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133104 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f85e193739c953358c865005855253af4f68a497 16-Jun-2011 John McCall <rjmccall@apple.com> Automatic Reference Counting.

Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133103 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
74da19fc3a52d7e3005eeb7a7833859da84fd12a 15-Jun-2011 Douglas Gregor <dgregor@apple.com> Introduce a -cc1-level option to turn off related result type
inference, to be used (only) by the Objective-C rewriter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133025 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4c4efee6d3113f20b41efaeec08934332d2ea40e 13-Jun-2011 Douglas Gregor <dgregor@apple.com> Eliminate the -f[no]objc-infer-related-result-type flags; there's no
reason to allow the user to control these semantics through a flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132919 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
926df6cfabf3eaa4afc990c097fa4619b76a9b57 11-Jun-2011 Douglas Gregor <dgregor@apple.com> Implement Objective-C Related Result Type semantics.

Related result types apply Cocoa conventions to the type of message
sends and property accesses to Objective-C methods that are known to
always return objects whose type is the same as the type of the
receiving class (or a subclass thereof), such as +alloc and
-init. This tightens up static type safety for Objective-C, so that we
now diagnose mistakes like this:

t.m:4:10: warning: incompatible pointer types initializing 'NSSet *'
with an
expression of type 'NSArray *' [-Wincompatible-pointer-types]
NSSet *array = [[NSArray alloc] init];
^ ~~~~~~~~~~~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:72:1:
note:
instance method 'init' is assumed to return an instance of its
receiver
type ('NSArray *')
- (id)init;
^

It also means that we get decent type inference when writing code in
Objective-C++0x:

auto array = [[NSMutableArray alloc] initWithObjects:@"one", @"two",nil];
// ^ now infers NSMutableArray* rather than id




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132868 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fb3f4aad0436a9c40e9130598162150890c405b5 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -fgnu89-inline. Fixes PR10041.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132460 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c9471b0ff1815ed0149dbfcad0f385ed8648eeb0 21-May-2011 Douglas Gregor <dgregor@apple.com> Introduce the -fdiagnostics-format=xxx option to control how Clang
prints the file, line, and column of a diagnostic. We currently
support Clang's normal format, MSVC, and Vi formats.

Note that we no longer change the diagnostic format based on
-fms-extensions.

Patch by Andrew Fish!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131794 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3dc05418538c719fea48b906bfa4febe5296e126 05-May-2011 Nick Lewycky <nicholas@mxc.ca> Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130899 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c1598700010cea9364a58a65e967b0b56361b6aa 05-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Change cycle detection to be based off of a warning flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5ea4f44e34449a78d6b38aa47c14b527839d7aac 04-May-2011 Nick Lewycky <nicholas@mxc.ca> Record where the GCOV data files should be placed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130866 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fe57eef44cc80e5bb51e4f484835be08b8d84256 04-May-2011 Sean Hunt <scshunt@csclub.uwaterloo.ca> Implement a better version of delegating constructor cycle detection.

This is more efficient as it's all done at once at the end of the TU.
This could still get expensive, so a flag is provided to disable it. As
an added bonus, the diagnostics will now print out a cycle.

The PCH test is XFAILed because we currently can't deal with a note
emitted in the header and I, being tired, see no other way to verify the
serialization of delegating constructors. We should probably address
this problem /somehow/ but no good solution comes to mind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130836 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b2dba4bc0eee144baa60e36599a0887496d1295e 02-May-2011 Chad Rosier <mcrosier@apple.com> When using -std= flag added check to make sure language and standard are compatable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130710 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f24a151d645abc89f94aa58ad59f3131502041b1 30-Apr-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -fno-dwarf2-cfi-asm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130616 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
39cd58cbffd1f7a144483857496df0294ce9c8e9 30-Apr-2011 Chad Rosier <mcrosier@apple.com> Removed redundant case statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130564 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a0fa203f04235cb6d05eeb8cea3392a01aa7571b 30-Apr-2011 Bob Wilson <bob.wilson@apple.com> Add -Oz option and use it to set the inline threshold to 25.
Radar 9333566. Patch by Chad Rosier!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130554 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f8c247d247f9f7ab2bf4965677e6d056711c99d5 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Move all of the logic for __DEPRECATED to the driver based on comments
from dgregor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130066 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1cfe3c305c0d5393fd94167808b8f5d96cd65227 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> Fix Clang's __DEPRECATED define to be controled by -Wdeprecated. This
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130055 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
50465d1d2f5f6dd3d8e18e2cf7bad4691e5ca6a8 23-Apr-2011 Chandler Carruth <chandlerc@gmail.com> There were some frustrating problems with the implementation of
-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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8387e2a41eef6fa17fb140a18c29b6eee9dd2b8a 23-Apr-2011 Francois Pichet <pichet2000@gmail.com> Add -fdelayed-template-parsing option. Using this option all templated 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130022 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e8ba8d78a258ec992d3521eebdae8324db777b14 22-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Wire up the -ftest-coverage and -fprofile-arcs flags to .gcno file emission (at
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129956 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7d2b8c1fcc2b707be78b09930a7767477822462f 16-Apr-2011 Douglas Gregor <dgregor@apple.com> Initial work to improve documentation for Clang's diagnostics, from Matthieu Monrocq

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129614 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fc8f0e14ad142ed811e90fbd9a30e419e301c717 15-Apr-2011 Chris Lattner <sabre@nondot.org> fix a bunch of comment typos found by codespell. Patch by
Luis Felipe Strano Moraes!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129559 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7e7fbd05a5dfdb0addfc8b5af2fcbed8c7b5fb87 15-Apr-2011 Peter Collingbourne <peter@pcc.me.uk> C1X: add a language standard

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a5fc472b353b88be3b4981da946fb01f5a5cc0c6 10-Apr-2011 John McCall <rjmccall@apple.com> Fix a bunch of major problems with __unknown_anytype and properly test
for them. The only major missing feature is references.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129234 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
919f2ca3c21f6b590eea50645ff5bedb54d81673 09-Apr-2011 Chris Lattner <sabre@nondot.org> accept -x objc-cpp-output as an alias for -x objective-c-cpp-output,
per PR9577


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
08c6695f6018fb6cb1a7c7d311a851aa5c233bc0 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Sketch support for -diagnostic-log-file, which still doesn't do anything.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129086 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
969323239f16589329d091a2b8ef200fcfe7c9e9 29-Mar-2011 Daniel Dunbar <daniel@zuster.org> Integrated-As: Support -Wa,-L when using the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128433 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
34b8e6889a12c90e8053fba8a1ea49b17c05ac51 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Flip the default for showing include stacks on notes to false. This
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128390 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
abaca7a8be8e79cc01354676e3bcb26575640311 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Add an option to suppress include stack printing on note diagnostics.
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128371 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3c66d30d513106bb794990c5e4ba36a31ac19f15 22-Mar-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add a more explicit -backend-option flag for passing backend command
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
207f4d8543529221932af82836016a2ef066c917 18-Mar-2011 Peter Collingbourne <peter@pcc.me.uk> Add support for language-specific address spaces. On top of that,
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2ed42287b9b88a0bb08ab10e95e306da3f294ba9 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Lexer: Add extremely limited support for -traditional-cpp, ignoring BCPL
comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127910 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
32096695c76033a6b0b1747c439f7378a11e8312 18-Mar-2011 John McCall <rjmccall@apple.com> The Darwin kernel does not provide useful guard variable support.
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.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127854 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1040c227efc6821cd39795206c178894470a1a48 16-Mar-2011 Sandeep Patel <deeppatel1987@gmail.com> Fix duplicate argument processing

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127746 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b0f4b9a558933b307073f7cd7753602f94354ae9 09-Mar-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce '-chain-include' option to specify headers that will be converted to chained PCHs in memory
without having to use multiple runs and intermediate files.

Intended for testing & debugging of chained PCH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127339 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e6ec11aa15c7104d57009c6e036bf4ae29c35fb2 07-Mar-2011 Douglas Gregor <dgregor@apple.com> Remove the AST printer (-ast-print-xml), which is too incomplete and
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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127141 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
cfe9af250f466e7e38becea4428990448ae07737 01-Mar-2011 Roman Divacky <rdivacky@freebsd.org> Implement -mrtd which sets the StdCall calling convention to be the default
one.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c4d2c9074be6eb2091086eddd6c8f052f3b245c8 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-check-objc-mem' flag, the nominee for best misnomer award.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126676 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
05357018b2e5e66559ad0ce2147dc1db9af42b9d 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Migrate ArrayBoundCheckerV2 to CheckerV2.

Turns -analyzer-check-buffer-overflows into -analyzer-checker=core.experimental.Overflow

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126609 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
58f2e7c3c3860e410fa3d8252862ef10be7cdc70 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Turn -analyzer-stats into -analyzer-checker=debug.Stats

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126608 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6dd4dffe1090e820e9b5b25eee8ad3907a1aa679 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-checks' flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126607 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e293d30e858e38f2bb028c37ecac2178f8d78aa9 25-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> Teach objc-rewriter to pass -fobjc-exceptions along.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126497 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
116f3640daee424dfcdbe55e80be5a67476be4b0 25-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Intoduce '-analyzer-checker-help' flag which outputs a list of all available static analyzer checkers.

This is pretty basic for now, eventually checkers should be grouped according to package, hidden checkers should be indicated etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126454 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
65d39251ff57b8e33cf6d3a7fcc6aa1c6f8cdc68 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Remove '-analyzer-experimental-internal-checks' flag, it doesn't have any checkers associated with it anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126440 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
38c8fe705ec4a8efa8992b99ab6d264fff14ca36 24-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Allow passing a list of comma separated checker names to -analyzer-checker, e.g:
-analyzer-checker=cocoa,unix

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126372 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0761e44550f094633bbe7fd4ae1d79ec456fca69 23-Feb-2011 Anders Carlsson <andersca@mac.com> Add a -fcxx-exceptions flag to clang -cc1. This controls the newly added CXXExceptions flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126300 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0bb208c91e91e2fe91e0f487b00ff4b5b30c8cc2 22-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Remove the storage for -cxx-system-include. Make libcxx toolchain
use -nostdinc++ and -cxx-isystem.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126223 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e9b801f7633b11b18d357a71442bd003435784e8 22-Feb-2011 Anders Carlsson <andersca@mac.com> Make clang -cc1 disable Objective-C exceptions by default, and add a -fobjc-exceptions flag to turn them on.

Update all tests accordingly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126177 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2df6647847af283302834dadae5d9dcefa7e0ad4 22-Feb-2011 Joerg Sonnenberger <joerg@bec.de> Bug#8945: Add -cxx-isystem option to specify C++ system directories.
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.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126167 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
da4b7cf09ebfd4e4098b516081fa9dae2f5c99e0 20-Feb-2011 Anders Carlsson <andersca@mac.com> Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126061 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
91a230a15f2aca8f6a8b7fd492525ec372a98e6b 17-Feb-2011 Douglas Gregor <dgregor@apple.com> Eliminate the internal command-line option for viewing inheritance in C++ 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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125762 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c9f2e0f286500c7e747849b3aa9c0e67a4dc90d7 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the IdempotentOperationChecker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125611 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
43dee220252ef0b42c5f8a3bb1eca97f84f2565f 14-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Overhauling of the checker registration mechanism.

-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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f315fa81eef1977b3457fd7a7d4639e060fe7278 14-Feb-2011 Peter Collingbourne <peter@pcc.me.uk> OpenCL: add support for __kernel, kernel keywords and EXTENSION,
FP_CONTRACT pragmas. Patch originally by ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
be4c8705e499b55548467eb7adaa23cbc6edfef9 10-Feb-2011 Roman Divacky <rdivacky@freebsd.org> Implement mcount profiling, enabled via -pg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125282 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
17d3fea677753e6e3e82ffe2cbdeccbf5f2e7497 09-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver/Frontend: Wire up -mregparm=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125201 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d767d81290288c030f3be0be1d3e62b9c8df51dc 09-Feb-2011 Ted Kremenek <kremenek@apple.com> static analyzer: Further reduce the analyzer's memory usage when analyzing 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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
142f9e99018a85105cee570133c111a52f2053ec 04-Feb-2011 Fariborz Jahanian <fjahanian@apple.com> -fapple-kext cannot have 'weak' visibility in this
abi.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124834 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b34d69b9292534c1c574f168f0ac10aea652adca 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Add -header-include-file option, for allowing saving header include
information to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124750 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
eef63e0997e0f6d6436736ea919b851cfe34955a 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> Frontend: Factor out header include dumping (-H) into its own preprocessor
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.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124723 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6f75550e40a9177db9979fc130ce3ece026b137d 01-Feb-2011 Douglas Gregor <dgregor@apple.com> Basic support for -mms-bitfields, from Carl Norum!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f25649c74397d2620e6ac61f1045261644707c80 29-Jan-2011 Nico Weber <nicolasweber@gmx.de> Support for -plugin-arg- with -add-plugin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124551 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
bd5a94e263137dc3ce7c100485626bae025cf58e 26-Jan-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Enable the self-init checker under command-line option '-analyzer-check-objc-self-init' which by default
is enabled by the driver for '--analyze'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124266 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5aa74affa5d61d04c4b034b3722ca41aec0cba6e 25-Jan-2011 Nico Weber <nicolasweber@gmx.de> Add -add-plugin flag, which runs plugins in addition to codegen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124227 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b466d01e464b21832c23eeed90112bc5c26c0236 07-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Add all options needed to support -fapple-kext. wip.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
112c3307aaa9ae9ee6ff5c2b4f6a53b1ea3c6f19 04-Jan-2011 Fariborz Jahanian <fjahanian@apple.com> Fold -fobjc-nonfragile-abi2 into -fobjc-nonfragile-abi.
// rdar://8818375



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122831 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c32647d111e516593b9ba242cad7b8ff4016c155 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add -fobjc-default-synthesized-properties flag
to allow us to explicitly control whether or
not Objective-C properties are default synthesized.
Currently this feature only works when using
the -fobjc-non-fragile-abi2 flag (so there is
no functionality change), but we can now turn
off this feature without turning off all the features
coupled with -fobjc-non-fragile-abi2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122519 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c478a1425c055e517169220ea1c1efd857e65f52 23-Dec-2010 Ted Kremenek <kremenek@apple.com> Add WIP prototype of a new buffer overflow
checker based on using raw (symbolic) byte offsets
from a base region.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122469 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
91252d115bdb6f937192a8dbc86c5abe00101436 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-std=

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120882 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4400cb8c548a90c472444b57690117563f4be195 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-mad-enable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120881 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f0840820b4e28fd0cc04d737382811d7372cb832 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-fast-relaxed-math

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120880 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5f67e13fcdc3c33e9cd5d027bfbb677b726c6f6a 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-unsafe-math-optimizations

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120879 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5d729a3d8eeba59ed97119998f2135ad6d45e876 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-finite-math-only

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120878 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0982136cb748f4a842141bf199d133126d6be882 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-single-precision-constant

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120877 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
61e07861dd3a70c31f658bad8c4b911994e4933b 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Implement -cl-opt-disable

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120876 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0a3c03cb1fbc1f84f851d6ad642d22b978b031fd 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Refactor optimisation level code

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120875 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
53c92be3b233cede6114702a5f86f146f55d6c6e 04-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Introduce CompilerInvocation::setLangDefaults function

This patch refactors the CompilerInvocation code to introduce a
CompilerInvocation::setLangDefaults function, which can set up a
LangOptions with the defaults for a given language and language
standard. This function is useful for non-command line based Clang
clients which need to set up a CompilerInvocation manually for a
specific language.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120874 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
895fcca55a6d52a71639f2472a6623ab2dd9f628 01-Dec-2010 Peter Collingbourne <peter@pcc.me.uk> Driver, Frontend: add CUDA language support

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120544 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
03013fa9a0bf1ef4b907f5fec006c8f4000fdd21 29-Nov-2010 Michael J. Spencer <bigcheesegs@gmail.com> Merge System into Support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120297 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f35142413974e9dfe2c5f202084db4bd1c2073e9 24-Nov-2010 John McCall <rjmccall@apple.com> Add -cc1 -ast-dump-xml, an excessively detailed XML dump of the internals
of the ASTs. Only available in assertions builds. No stability guarantee.

This is intended solely as a debugging tool. I'm not sure if the goals
are sufficiently aligned with the XML printer to allow a common
implementation.

Currently just falls back on the StmtDumper to display statements,
which means it doesn't produce valid XML in those cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120088 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
39b49bcaaddb1049234fca9500c0ac02c088e23d 23-Nov-2010 Chris Lattner <sabre@nondot.org> now the FileManager has a FileSystemOpts ivar, stop threading
FileSystemOpts through a ton of apis, simplifying a lot of code.
This also fixes a latent bug in ASTUnit where it would invoke
methods on FileManager without creating one in some code paths
in cindextext.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120010 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7ad97ffa631af6ad678c79b38341ac995f347ce9 23-Nov-2010 Chris Lattner <sabre@nondot.org> give FileManager a 'FileSystemOptions' ivar, which will be used
to simplify a bunch of code in it. It should ultimately get inlined
into FileManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120007 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1380a147d4578b619c215b23aa79ce17036d3c46 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> -Rename -Wargument-larger-than -> -Wlarge-by-value-copy
-Improve the diagnostic message
-Add some comments

Suggestions by Chris.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119594 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3532fdd1db8ff6f353f2a5b215cebe3e0e2ff3c2 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce option -Wargument-larger-than[=N] which warns about function definitions if they take by-value
or return by-value any POD that is larger than some threshold (default is 64 bytes).

Implements rdar://8548050.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119583 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
389db16c63eec6ecfa9b235155252d8da766e94e 03-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -working-directory.

When -working-directory is passed in command line, file paths are resolved relative to the specified directory.
This helps both when using libclang (where we can't require the user to actually change the working directory)
and to help reproduce test cases when the reproduction work comes along.

--FileSystemOptions is introduced which controls how file system operations are performed (currently it just contains
the working directory value if set).
--FileSystemOptions are passed around to various interfaces that perform file operations.
--Opening & reading the content of files should be done only through FileManager. This is useful in general since
file operations will be abstracted in the future for the reproduction mechanism.

FileSystemOptions is independent of FileManager so that we can have multiple translation units sharing the same
FileManager but with different FileSystemOptions.

Addresses rdar://8583824.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118203 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1fb0caaa7bef765b85972274e3b434af2572c141 22-Oct-2010 John McCall <rjmccall@apple.com> Substantially revise how clang computes the visibility of a declaration to
more closely parallel the computation of linkage. This gets us to a state
much closer to what gcc emits, modulo bugs, which will undoubtedly arise in
abundance.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117147 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
dae4ac4fe56ec60fc93b3e3c9f51e79e682084b9 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Reorganize predefined macros for all Windows targets.

This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116999 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
20249a1af2e462dcafdd6a350f1c7967b264ff25 21-Oct-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116990 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6648e5d387b5402eae6a597bd46709ac445b4156 19-Oct-2010 Ted Kremenek <kremenek@apple.com> "Fix" bogus idempotent operations warning due to loop unrolling not unrolling enough loops to show that an invariant
doesn't hold. This fix is to increase the loop unrolling count to 4, which experiments show doesn't typically impact
analysis time. The real fix is to modify the IdempotentOperationsChecker to suppress warnings where an analysis point
could be preceded by a point where we gave up due to loop unrolling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116769 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4d5625e15bb215c2241c022df8dc7b04438970c6 15-Oct-2010 Dan Gohman <gohman@apple.com> Wire up the -fstrict-aliasing and -fno-strict-aliasing options
to CodeGenOption flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116530 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3e78593b1ced32b7e0a97da044213014ee0f6f7c 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce command line option -error-on-deserialized-decl that is accompanied by a name
and emits an error if a declaration with this name is deserialized from PCH.

This is for testing, to make sure that we don't deserialize stuff needlessly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b972858068d2ea77f72a1e7b1812b196afd6be2e 14-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce command line option -dump-deserialized-decls which is used to print the PCH decls that got deserialized, for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116503 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a9f4f620daf073805b89e893afcdc5eb7a9bdc50 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate the (de-)serialization of code completion results, now that
libclang does not support out-of-process code completion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116253 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d3ab63e0f66429abf2a3e4cde889e420e41e8790 12-Oct-2010 Douglas Gregor <dgregor@apple.com> Eliminate -fdiagnostics-binary and all of the infrastructure for
emitting diagnostics in a binary form to be consumed by libclang,
since libclang no longer does any of its work out-of-process, making
this code dead. Besides, this stuff never worked at 100% anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116250 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9d520c5ae802fc175c61032b289ddd6968e6ddd2 11-Oct-2010 Axel Naumann <Axel.Naumann@cern.ch> Declare argv parameters as const char* const* instead of to char** to clarify that they are not modified, and to allow for string literals as arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116200 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9a2b9d794bdf349b517ff799170f4409f45d147c 08-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Implement -fshort-enums (rdar://8490496).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c69e1cf04323f2e786d40e8a5ba84e77ee1c6827 30-Sep-2010 Devang Patel <dpatel@apple.com> Introduce -flimit-debug-info.
In this experimental mode try avoiding debug info emission for classes as much as possible. The goal is to reduce size of produced debuginfo without reducing quality of debug info in general. This is a work in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115188 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9121ba232903ebe61e7bbe14ca294cf0f07dfa96 30-Sep-2010 Marcin Swiderski <marcin.sfider@gmail.com> Added two new command line arguments:
-cfg-add-implicit-dtors - sets CFG::BuildOptions::AddImplicitDtors for AnalysisCosumer to true,
-cfg-add-initializers - sets CFG::BuildOptions::AddInitializers for AnalysisCosumer to true.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115142 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7f18e67e1b577a50402e8b43508ab2311a5c45b5 17-Sep-2010 David Chisnall <csdavec@swan.ac.uk> Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114192 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
52d861ce41ce84d8389495ea78d97bcc962ac5ba 10-Sep-2010 Tom Care <tom.care@uqconnect.edu.au> Added AnalyzerStatsChecker, a path sensitive check that reports visitation statistics about analysis. Running clang with the -analyzer-stats flag will emit warnings containing the information. We can then run a postanalysis script to take this data and give useful information about how much the analyzer missed in a project.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113568 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
80c26f44a6f8d859a2a3babb06bd3ca8d86f2623 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -cxx-system-include option which can be used to specify an
explicit list for the C++ system include directories at the -cc1 level, as an
alternative to the horrible AddDefaultCPlusPlusIncludePaths().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113505 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
400b607546a8dbfcee3b690f3d0a2fee0ea6480b 03-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions
(original patch r112791 was reverted due to a bug).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112915 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d0b4e7c8723c031cd8d743b2ff63943a3d0563ff 02-Sep-2010 Dawn Perchik <dawn@burble.org> Reverting rev 112791 - apparently -fborland-extensions is on all the time?!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112797 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
621a2f36af707747d70b8103bda6f65237fce899 02-Sep-2010 Dawn Perchik <dawn@burble.org> Add support for Borland extensions via option -fborland-extensions


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112791 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
2dc14532b641bae011a374e2c6c393d2196c1411 30-Aug-2010 Duncan Sands <baldrick@free.fr> Straighten out target triples provided on the command line
before using them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112468 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f7c16d903f11814e2d6780e2a2e189b7a7afc4ed 25-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add basic -H support.
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111983 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
23637beead1fce7dac755890c9482bcdce538b87 25-Aug-2010 Chris Lattner <sabre@nondot.org> correct the -isystem option to not add the -isysroot path. Only the weird
-iwithsysroot flag should do that. This fixes rdar://8345942


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9db9ad3f084d3c70cff01a10d4fd90901982b37b 24-Aug-2010 Chris Lattner <sabre@nondot.org> Implement -iwithsysroot, an apple extension which is a close cousin of -isystem.
Instead of implementing -isystem, I accidentally implemented this cousin. Next
up is to implement -isystem right.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111966 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
875ab10245d3bf37252dd822aa1616bb0a391095 22-Aug-2010 John McCall <rjmccall@apple.com> Abstract out member-pointer creation. I'm really unhappy about the current
duplication between the constant and non-constant paths in all of this.

Implement ARM ABI semantics for member pointer constants and conversion.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111772 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4786c15f4977c7cee98fde3ebdee213dba23848b 19-Aug-2010 Douglas Gregor <dgregor@apple.com> Add machine-parseable Fix-It output as part of diagnostics, under the
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111557 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6ab7cd853e9c15cf986a8a7c3db1f8d20e275409 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename the ASTReader header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111474 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c43b54cbc10654ed59de797898042e1a05265246 19-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Rename PCHReader to ASTReader.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111467 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
857281328fa824782bdd979c3bfdd97ecdbc1609 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Reintroduce the serialization library, with fixed dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111279 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4557e473c9e673e7e6f7063478f63a5b3c6c10b2 17-Aug-2010 Douglas Gregor <dgregor@apple.com> Revert Sebastian's build-breaking patch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111265 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
93c972945bccd1a966b0445f9ed45db433b77bc1 17-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Create a new Serialization module that contains all the PCH code, and will contain all the module code in the future. Update the Makefiles, CMake projects and the Xcode project. I hope I did everything right for Xcode. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111258 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e55fd871b0cf3e4ebc708cf46831908d74eab40a 16-Aug-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add two options for playing with modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111166 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8071e4212ae08f8014e0c3ae6d18b7388003a5cc 15-Aug-2010 Douglas Gregor <dgregor@apple.com> Extend the code-completion caching infrastructure to include global
declarations (in addition to macros). Each kind of declaration maps to
a certain set of completion contexts, and the ASTUnit completion logic
introduces the completion strings for those declarations if the actual
code-completion occurs in one of the contexts where it matters.

There are a few new code-completion-context kinds. Without these,
certain completions (e.g., after "using namespace") would need to
suppress all global completions, which would be unfortunate.

Note that we don't get the priorities right for global completions,
because we don't have enough type information. We'll need a way to
compare types in an ASTContext-agnostic way before this can be
implemented.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111093 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1450f265fcc84a7ca64dd9f3b8d4492c5bd55e23 13-Aug-2010 Nick Lewycky <nicholas@mxc.ca> Add a new cc1 option -fix-what-you-can which when combined with the fix-it mode
will apply all fixes even when there were other errors in the file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111020 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
279b5eb6910d64a293e9c0e2887a05c65d8737d7 13-Aug-2010 John McCall <rjmccall@apple.com> Just disable the hidden-visibility optimization for now by hiding it behind
a -cc1 option. The Darwin linker complains about mixed visibility when linking
gcc-built objects with clang-built objects, and the optimization isn't really
that valuable. Platforms with less ornery linkers can feel free to enable this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110979 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
39065a5494613952b4810d1d6b28348cef155e12 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Add -target-linker-version, for specifying the version string of the
linker in use.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110871 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f84d409903dd4107c8cef5a08fcfce6e5c21d4de 08-Aug-2010 Eric Christopher <echristo@apple.com> Make -funroll-loops turn on loop unrolling in the optimizer instead
of just ignoring it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110525 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1fafd1d96419f587763d1b81332d8f476aeace2e 07-Aug-2010 Tom Care <tcare@apple.com> Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110482 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9b823e8e1ccb8a2cb49923bad22a80ca96f41f92 03-Aug-2010 Ted Kremenek <kremenek@apple.com> Add -cc1 option '-unoptimized-cfg' to toggle using a CFG (for static analysis) that doesn't prune CFG edges.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110087 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fae3b2f4743dad616623c4df2fdb0f5128bd36d9 27-Jul-2010 Douglas Gregor <dgregor@apple.com> Implement -fno-validate-pch at the -cc1 level, which suppresses most
of the usual consistency checks used to determine when a precompiled
header is incompatible with the translation unit it's being loaded
into.

Enable this option when loading a precompiled preamble, because the
preamble loader will be performing all of this checking itself. Enable
the preamble-based test now that it's working.

This option is also useful for debugging Clang's PCH
(<rdar://problem/7532213>).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109475 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f4f6c9db68465b886ec2e596feaa6ecc782395a4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce basic support for loading a precompiled preamble while
reparsing an ASTUnit. When saving a preamble, create a buffer larger
than the actual file we're working with but fill everything from the
end of the preamble to the end of the file with spaces (so the lexer
will quickly skip them). When we load the file, create a buffer of the
same size, filling it with the file and then spaces. Then, instruct
the lexer to start lexing after the preamble, therefore continuing the
parse from the spot where the preamble left off.

It's now possible to perform a simple preamble build + parse (+
reparse) with ASTUnit. However, one has to disable a bunch of checking
in the PCH reader to do so. That part isn't committed; it will likely
be handled with some other kind of flag (e.g., -fno-validate-pch).

As part of this, fix some issues with null termination of the memory
buffers created for the preamble; we were trying to explicitly
NULL-terminate them, even though they were also getting implicitly
NULL terminated, leading to excess warnings about NULL characters in
source files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109445 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
87c300738174924453648c3b2d6f366c8284fac4 26-Jul-2010 Douglas Gregor <dgregor@apple.com> Eliminate the "minimal" and printing parser actions, which only ever
worked for C anyway. Also kills the -cc1 options -parse-noop and
-parse-print-callbacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109392 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f033f1da4a34f8df6e95e9929dc04ff54bb8fb01 20-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce a new lexer function to compute the "preamble" of a file,
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108913 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
df4ca423ec7d9b62842e112d1b824faa08b64810 16-Jul-2010 Tom Care <tcare@apple.com> Improved false positive rate for the idempotent operations checker and moved it into the default path-sensitive analysis options.
- Added checks for static local variables, self assigned parameters, and truncating/extending self assignments
- Removed command line option (now default with --analyze)
- Updated test cases to pass with idempotent operation warnings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108550 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a0068fc64351db9c47916566e3b85ab733cd8d6d 09-Jul-2010 Douglas Gregor <dgregor@apple.com> Introduce -f{no-}spell-checking options to enable/disable
spell-checking. By default, spell-checking is enabled for Clang
(obviously) but disabled in CIndex for performance reasons.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107992 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d6ac4524cd441808f152f7e10900a8315ea31c08 09-Jul-2010 Sebastian Redl <sebastian.redl@getdesigned.at> Add a frontend option -chained-pch and don't pass an active PCH reader to the PCH writer if it is not set, preventing creation of chained PCH files. Since the reader is so far unused, effectively no functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107936 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
db2fa8a7eb67b1e8f32a590b8e000e1259cff91a 06-Jul-2010 Tom Care <tcare@apple.com> Added a path-sensitive idempotent operation checker (-analyzer-idempotent-operation). Finds idempotent and/or tautological operations in a path sensitive context, flagging operations that have no effect or a predictable effect.

Example:
{
int a = 1;
int b = 5;
int c = b / a; // a is 1 on all paths
}

- New IdempotentOperationChecker class
- Moved recursive Stmt functions in r107675 to IdempotentOperationChecker
- Minor refactoring of SVal to allow checking for any integer
- Added command line option for check
- Added basic test cases

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107706 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1ad6648cce57bd187f1853f58fef26cd9bf4934f 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/IRgen: Add support for -momit-leaf-frame-pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107367 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a4d71455f0d418e16cc0c5c5aa55a3bad3494aee 26-Jun-2010 Chris Lattner <sabre@nondot.org> Implement support for -fwrapv, rdar://7221421

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
/external/clang/lib/Frontend/CompilerInvocation.cpp
7255a2d997b15beae82e627052fdb1b2474495c2 22-Jun-2010 Chris Lattner <sabre@nondot.org> implement support for -finstrument-functions, patch by Nelson
Elhage!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106507 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3177aae51a21f61ab483c52f97124bdb707da7f1 16-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Allow passing -cc1 level arguments to plugins. Patch by Troy Straszheim!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106113 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7cf84d66965a7706004d8590b5af5fe54b85f525 15-Jun-2010 Douglas Gregor <dgregor@apple.com> Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106003 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7e4953e5c60409007545288f14b430bd23d68570 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105838 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
5edbdcc62098e305cd55654814dcf783a3f3c477 11-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Add an option -fshow-overloads=best|all to limit the number of overload
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
/external/clang/lib/Frontend/CompilerInvocation.cpp
98b7c5c496dfccb39287b8f7d8f1444594936d10 11-Jun-2010 Charles Davis <cdavis@mines.edu> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
bfbb39deabba4f7b8c89d69a28653074c8936086 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Fix crashes on error paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105759 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
faddc3e53a95c68f2c3a966e0f1e6eba110dafd6 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
c34ce3fa613d5e4a283e53615fceafd17390445b 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Frontend: Lift InputKind enumeration to top level.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105577 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
6b0cf67ae72a9ebb90e94cc9a14e09364a2b3466 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
4ecc9b73b3716775ed4e09091e300796a9a72378 27-May-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
d8e8a58ee35ab334ab9d0c2154dca029c1822e8a 25-May-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
32148cef25570a4fbe3ad0ec497ce3ae2cf1b774 25-May-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
03e8ab2947a848fb0ce723dcebb1c19697614307 20-May-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
6362b893731ccf4480a96527db9e55e04b801503 18-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
f78cc4360eb4284091d0d38f3055084360f8c753 07-May-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
7b99d12b4ca67fccdf5090761ba257732e954e75 06-May-2010 Zhongxing Xu <xuzhongxing@gmail.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
6fbe8398ba1680ffc5daa7395850ff8765b7905b 04-May-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
6c1cb9916e9988dcdd65b9266dbe24afd173427a 04-May-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
e2e69ef80ac09a489d00ce104e2e87867dc3dd26 01-May-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
8a5e83c0237a39341736bc3e6068bf8ecf8e0daa 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
f643b9b338b797a824447207d7eab5f1187f4f34 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
ba5f6eced29937e4e4851a2c0980744768413d66 24-Apr-2010 Nick Lewycky <nicholas@mxc.ca> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
33e982bf782d851bfe5767acb1336fcf3419ac6b 22-Apr-2010 Fariborz Jahanian <fjahanian@apple.com> Support for -fno-constant-cfstrings option - wip.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102112 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
575cf3791216c33770ba950430493cdd43099f8f 20-Apr-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
eb5d7b752651283de5abfcc2f91df7227582a08d 17-Apr-2010 Chandler Carruth <chandlerc@gmail.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
046c294a43024874ff35656c6e785b64e72f1f36 17-Apr-2010 Anders Carlsson <andersca@mac.com> Vtable -> VTable renames across the board.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fb937b8c5f1c5dc9cfd4223b5cae230cc42b0287 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
3f87fb08dd502309960646db01099fb4c1be9a7c 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
dd17394d225b06376e9ae1d23f36cec463fdef01 14-Apr-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
c09289d104b8e01ecd998e3f08b2b0561049e1dc 13-Apr-2010 Zhongxing Xu <xuzhongxing@gmail.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
bbea7168326d810eff18dfb8bc43c7790fd55010 13-Apr-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
46116ce06ae28e3fc3a34c513f2f63ac02d9a194 10-Apr-2010 Anders Carlsson <andersca@mac.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
7002f4c03c2d0544f4e8bea8d3a5636519081e35 09-Apr-2010 John McCall <rjmccall@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
b69eca5d2196c06870d3eeb62d689feebaaa8a4d 08-Apr-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
83e7a78a9fa3fc495a575bca0e3d4d7ce26184ef 08-Apr-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
c100214fdc41a7ea215f75d433eb1cb829fd4330 07-Apr-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
4c2bcad7b843c10fd4a2ffd43da40bfefb4dc8ba 24-Mar-2010 Douglas Gregor <dgregor@apple.com> Implement support for -nostdc++. Fixes PR6446.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
efb0fa9e11f75af51744a6159530ef7cc8efa24a 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
2758595023c5c7c0495f19260089f975022c50dc 19-Mar-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
94dc8f640ebea52241412512ed48601626edbc58 19-Mar-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
4b7a834e0fecddd9eaf1f4567867c718e4eebf50 15-Mar-2010 John McCall <rjmccall@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
d46f98573ba104eda102dd3224b2dca69f1c6336 19-Feb-2010 John McCall <rjmccall@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
b689afb75049012a431d483432114ad5e75d4a92 13-Feb-2010 John McCall <rjmccall@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
824e19ed926d7aa1296a007d0607ac4437e3c4a9 13-Feb-2010 John McCall <rjmccall@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
824d7ea07a4e9208925daa6ae9289fb2b39bce9f 11-Feb-2010 Anders Carlsson <andersca@mac.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
73482884560be041d86eccbd7dd5a6918677393b 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
412e798941ca64e2e6b084323915fa9aa5f6bdf3 09-Feb-2010 Fariborz Jahanian <fjahanian@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
9bed8798964d9f07599c2c9199701f86fbc70e20 09-Feb-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
a508b7de6c5246ab04ed69d0ab4e9977ec1fb4d4 07-Feb-2010 Anders Carlsson <andersca@mac.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
da1573f95902a42aa4d11e8f45ab98ec7e27bc28 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
984eb8611d9ee46fc6351dee43609f2deed99f3c 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
d93256e55673a17d18543397ec462416acb13792 28-Jan-2010 Douglas Gregor <dgregor@apple.com> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
52388f9aefba585475a38081272ce582d033c883 13-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
124fca533d9fef2e3f6359283909bd342b5f5f26 09-Jan-2010 Chris Lattner <sabre@nondot.org> 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
/external/clang/lib/Frontend/CompilerInvocation.cpp
c31176d5ebbcd407aa512bbd5f717e35da629e7d 08-Jan-2010 Dan Gohman <gohman@apple.com> Use -fno-math-errno by default, and remove the IsMathErrnoDefault
targethook, which is no longer being used. This fixes PR5971.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92987 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
49ac8e63a0622ce049e58decab9e844b1e8c7ecd 23-Dec-2009 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Remove RewriteBlocks. It has been superseded by RewriteObjC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92014 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
38b48afd338d494099697d2611e1f45e558e469e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f2d8b9f967a1ab53ee9fdbcc3ac0a4ee0a83a26e 18-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -dwarf-debug-flags, which provides a way to embed the cc1 level options used
to compile a translation unit into the debug info for that file.
- Used by parts of Darwin build process to check compiler flags, etc.
- <rdar://problem/7256886> clang does not emit AT_APPLE_flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91661 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8663b180085e9bc7a0a87c80cc3f722efef99e79 16-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix -fdollars-in-identifiers Clang translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91562 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fc2844846e91398205fddc71196fe9dda04e105f 16-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> implement PR5654: add -fassume-sane-operator-new, which is enabled by default, and adds the malloc attribute to the global function new() and to the overloaded new operators.

feel free to chage the name to this lengthy argument

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91543 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
8b9adfea5e834eaee0f45d8cc7fb052d68df4a46 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add -resource-dir to clang -cc1, this allows the base directory for compiler
resources (e.g., /usr/lib/clang/1.1) to be passed on the command line instead of
computed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91370 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1e69fe3a9f0a42b32a3000bda51677d51416564e 13-Dec-2009 Daniel Dunbar <daniel@zuster.org> CompilerInvocation: Move builtin-include-path logic out of CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91237 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9f61aa9e280adea9fbf3365f0e4f6ed568c9885a 12-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Un-namespace-qualify llvm_unreachable. It's a macro, so the qualification gave
no extra safety anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91207 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9c276ae0f24d4cee8f7954069d4b8eae45d0447d 12-Dec-2009 Mike Stump <mrs@apple.com> Implement runtime checks for undefined behavior. WIP.

This implements a new flag -fcatch-undefined-behavior. The flag turns
on additional runtime checks for:

T a[I];

a[i] abort when i < 0 or i >= I.

Future stuff includes shifts by >= bitwidth amounts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
fc576514d06c46a7cac49500169411d82f38d04b 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Add clang-cc option '-analyzer-opt-analyze-nested-blocks' to treat block literals as an entry point for analyzer checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90810 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
93ebb1ba9f35ab5e7bff37c471baeb360eeb0b04 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Switch PCHReader::getOriginalSourceFile to use proper diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90434 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
9b5e9ae08defd14441acca1d7d4502b933bf6c5a 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Honor -help and -version when using new style option parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90422 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e14b5f5237d0740c2b21c50b2eb41a06e778d820 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 support for -remap-file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90414 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
efba227cc5459554eca466aafe786b5132dcb68c 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 -load option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90413 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
de05057932cebc3f43911f87d75869cb7b705a19 02-Dec-2009 Mike Stump <mrs@apple.com> Change rtti/Rtti to RTTI, as it is an acronym.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90334 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
56ac85c4fd18ee4af27c81b0ce11b2191461a0a5 01-Dec-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Move CompilerInvocation deserialization into CompilerInvocation.cpp,
where it belongs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90198 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
3b315264d1a6fa303e20fe0caec306ccafc090de 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add CodeGenOptions::{SoftFloat,FloatABI}, and update the all the (far too many) places to use this instead of using the backend -soft-float and -float-abi= options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
f219e7c1529fac29e34483667f740b452e5ef9cc 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move LLVM backend options to explicit clang-cc / clang -cc1 options, which we then manually pass to the command line library; eventually the latter grossness should be fixed by a real API when creating the target machine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90063 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e50c16773bed0a53c0df397186256606375e8722 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for LangOptions.
- This is the last major parsing piece, main FIXMEs remain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90059 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1b0969590e712d7d52fc9c0d43d3ab85c36d07a6 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change LangOptions::ObjCConstantStringClass to an std::string to avoid worrying about the lifetime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90052 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
7d065d0f21b35f445cee13730398bc2bec6edff2 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move MainFileName option variable into CodeGenOptions instead of LangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
0ff679f5ddd24a4acbeffc9757a9b2a6e4673c14 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for preprocessor options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89917 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
d8c780612f33efb2fdc53234129f1df195aacbb1 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for header search options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89916 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
eb01ac82901a9fd8f64d387395af42165556b767 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for frontend options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89856 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
21affc089773edc30be43ecb0022a48acdac7093 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of diagnostic options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89716 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
e2814d89025b847ad7363b21e3e053bbae180b54 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of analyzer options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89629 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
50a4487683a7e09fb93e8b506181e034241a0ffe 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing of CodeGenOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89464 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
1be3b3bd5c983e3fc5b78db155632d2d2d6aa968 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix some default in the option classes, and some CompilerInvocation argification
errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89388 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
217acbfa3524d5805fda7900b26c1e779443588d 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch some 'clang -cc1' support, for testing parts of CompilerInvocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89333 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c59dc9274612f318d43910a3b5de19997a8eb656 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Remove some more llvm::cl::init arguments, by only setting values when
the argument is given.

Also, tweak Opt.Sysroot defaulting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
4db166b723495fbfa475b50c44f38a4c1bc0bc34 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change -code-completion-debug-printer to -no-code-completion-debug-printer.

Also, tweak a few help strings and update CompilerInvocation serialization for prev change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89317 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
a51ca5221235325ac420954a357db19290b8f93a 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Simplify CompilerInvocation::toArgs, now that LangOptions handling is more predictable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89074 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
c5a97ec19408c3dca4b6a6385f11d8c783b94d0b 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fnext-runtime defaulting to driver (and change clang-cc default to
-fnext-runtime), instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89058 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp
b3375cba7938e01895bb504e7e48ad94a2e07dd1 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add initial cut at CompilerInvocation::toArgs, which "serializes" the CompilerInvocation into a list of arguments which can be passed to clang-cc (eventually, clang -cc1).
- Unfortunately, this is currently a tedious and manual translation. Eventually it would be nice to automatically generate this code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89049 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/lib/Frontend/CompilerInvocation.cpp