• Home
  • History
  • Annotate
  • only in /external/clang/lib/Driver/
History log of /external/clang/lib/Driver/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c50010f412ad39bda1b70cdc0f082597dcbacbb8 23-Oct-2014 Tim Murray <timmurray@google.com> Revert "Bring in fixes for Cortex-A53 errata."

This reverts commit 1aeaece93aae941bb1bbb3a226398a311dfe18e8.

bug 18094492
ools.cpp
1aeaece93aae941bb1bbb3a226398a311dfe18e8 17-Oct-2014 Stephen Hines <srhines@google.com> Bring in fixes for Cortex-A53 errata.

Bug: 18034609

(cherry picked from commit 7fb0af86e33f382a8e4a8f23cc1ab471b7134995)

Change-Id: Ifc04c2a8e3ec13efd3a5f5ed4879f0a657df50cf
ools.cpp
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
ndroid.mk
C1AsOptions.cpp
MakeLists.txt
ompilation.cpp
river.cpp
ob.cpp
anitizerArgs.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
indowsToolChain.cpp
6bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89 29-May-2014 Stephen Hines <srhines@google.com> Update Clang for 3.5 rebase (r209713).

Change-Id: I8c9133b0f8f776dc915f270b60f94962e771bc83
ompilation.cpp
river.cpp
ob.cpp
ultilib.cpp
anitizerArgs.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
indowsToolChain.cpp
651f13cea278ec967336033dd032faef0e9fc2ec 24-Apr-2014 Stephen Hines <srhines@google.com> Updated to Clang 3.5a.

Change-Id: I8127eb568f674c2e72635b639a3295381fe8af82
ction.cpp
ndroid.mk
MakeLists.txt
ompilation.cpp
river.cpp
ob.cpp
ultilib.cpp
anitizerArgs.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ypes.cpp
indowsToolChain.cpp
229d345dd5a73ef6ba75d1d730ecf96e8dc9ecec 08-Feb-2014 Stephen Hines <srhines@google.com> Update clang for merge to LLVM 3.4.

Update TableGen rules:
- AttrExprArgs
+ AttrIdentifierArg
+ AttrParsedAttrImpl
+ AttrTypeArg

Update config.h files.

Adjust Android.mk for added/removed files:

+ TransProtectedScope.cpp

- DumpXML.cpp

+ Consumed.cpp

+ CodeGenABITypes.cpp

+ SanitizerArgs.cpp

+ AllocationDiagnostics.cpp
- CommonBugCategories.cpp
+ IdenticalExprChecker.cpp

+ CommonBugCategories.cpp
- SymbolManager.cpp
- TextPathDiagnostics.cpp
+ SymbolManager.cpp

Change-Id: I73bea10e7e73e611f678bc5bf9935e26da63be17
ndroid.mk
1fab7c3e3bd97a909a80b1bfea1909c6e7347fc0 12-Feb-2014 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/release_34' into merge-20140211

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: I17ca7161f32007272ee82036d237d051847dd02e
c54c885099ddbe81445ec58d8c12c97086569a91 09-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196720:
------------------------------------------------------------------------
r196720 | joerg | 2013-12-08 05:54:58 -0800 (Sun, 08 Dec 2013) | 3 lines

Extend assembler handling for NetBSD/MIPS to pass down the correct ABI,
architecture and PIC flag.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196747 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ac66cb8654528f3539925dbbaf1597a1e3ca11db 08-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196630:
------------------------------------------------------------------------
r196630 | joerg | 2013-12-06 16:57:46 -0800 (Fri, 06 Dec 2013) | 3 lines

Pass correct flags to assembler and linker for OpenBSD on AMD64, PowerPC
and MIPS64. From Brad Smith.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196706 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
182fc2d652e46c3966d9545061471434270e2457 06-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196538:
------------------------------------------------------------------------
r196538 | joerg | 2013-12-05 13:27:58 -0800 (Thu, 05 Dec 2013) | 2 lines

For NetBSD, use arm1176jzf-s as default CPU for ARMv6.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196597 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
cf660bd73e72b6ac36cd4512828cd2ef992f119e 06-Dec-2013 Bill Wendling <isanbard@gmail.com> Merging r196532:
------------------------------------------------------------------------
r196532 | joerg | 2013-12-05 13:07:29 -0800 (Thu, 05 Dec 2013) | 2 lines

Pass down the target CPU to the system assembler for NetBSD/ARM.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196596 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0d5d6ff1b8986352c523a1e83803787fdb0389f8 02-Dec-2013 Daniel Sanders <daniel.sanders@imgtec.com> Merged r195756:
------------------------------------------------------------------------
r195756 | atanasyan | 2013-11-26 11:58:04 +0000 (Tue, 26 Nov 2013) | 1 line

[Mips] Pass -mmsa option to the assembler.
------------------------------------------------------------------------



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196083 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6c5c3adab3ff343c2fc6d9a34808aa9b65d6baaa 02-Dec-2013 Daniel Sanders <daniel.sanders@imgtec.com> Merged r195249:
------------------------------------------------------------------------
r195249 | atanasyan | 2013-11-20 13:53:20 +0000 (Wed, 20 Nov 2013) | 2 lines

[Mips] Take in account the -mfp64 command line option when build paths
to the crt*.o files, libraries and headers for the MIPS FSFS toolchain.
------------------------------------------------------------------------



git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@196082 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
e9a9086c4bcf404d19cec52baa5a6d27445559ec 26-Nov-2013 Bill Wendling <isanbard@gmail.com> Merging r195422:
------------------------------------------------------------------------
r195422 | alp | 2013-11-22 00:27:46 -0800 (Fri, 22 Nov 2013) | 5 lines

Tidy up the no-external-assembler diag

Diags aren't usually in the first person, and 'windows' isn't the correct
product spelling to use in prose. Sidestep issues completely by making this
error message platform-neutral.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_34@195726 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
6efcf6f97a97242a9ca6583375457048277d9018 19-Nov-2013 Kevin Enderby <enderby@apple.com> Change the clang driver with the use of -no-integrated-as for darwin to use
the -Q flag to the as(1) assembler driver.

We will soon be switching the darwin as(1) assembler driver to call clang(1)
and use the intergated assembler by default. To do this and still support
clang(1)'s -no-integrated-as flag, when clang(1) runs the as(1) assembler
driver and -no-integrated-as is used it needs to pass the -Q flag to as(1)
so it uses its GNU based assembler, and not turn around and call clag(1)'s
integrated assembler.

rdar://15495921


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195054 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
07ac846d50503fcbd78bf9de031cba1157393cfd 17-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove method that always returns true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194984 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2dcdc5beed983fb95617a9449fd7420bd7fd7753 17-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove two unused #ifdefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194983 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
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
ools.cpp
32ca73e33fcc7c75ea1c297755a300be3e9e5371 16-Nov-2013 Jim Grosbach <grosbach@apple.com> X86: Make specifying avx2 simpler on Darwin with '-arch'

Teach the '-arch' command line option to enable the compiler-friendly
features of core-avx2 CPUs on Darwin. Pass the information along in the
target triple like Darwin+ARM does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194907 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.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
ools.cpp
cc82b98811a0df6a41e8a92bd9f7361f4815e3df 15-Nov-2013 Alexander Potapenko <glider@google.com> [ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Add a test.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194820 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
2317f7b702ee23643d0ff6fe426f64689e9f0ea5 14-Nov-2013 David Peixotto <dpeixott@codeaurora.org> Fix typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194744 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4ca9eaebfb283441c3a8398ff190b8e8e13b21eb 14-Nov-2013 David Peixotto <dpeixott@codeaurora.org> Pass -Wa,-I and -Xassembler -I args to integrated assembler

This patch adds -I to the arguments that are passed to the
integrated assembler from -Wa, and -Xassembler args.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194743 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
17c384c7418ad93b3ceb04218734950f7f32e993 14-Nov-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [objcmt] Transfer the objcmt flags from the driver to cc1 invocation and
instantiate ObjCMigrateASTConsumer with the specific options that were enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194628 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7792fde854b5d2bb9d2dc18b4a1de09397307220 13-Nov-2013 Weiming Zhao <weimingz@codeaurora.org> Adds ARM backend options: -mrestrict-it and -mno-restrict-it

To support the generation of IT block in Thumbv7 way or
Thumbv8 way


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194593 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
08d86e9c4b0c6a7cd4a770d6e540ae679cdc55c4 12-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194507 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5d5058c08e72666fc646581c454bb684cca01197 12-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194489 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0e325bef80afcbc3e07a8e6b611a0e5fdc52ab5c 12-Nov-2013 Robert Lytton <robert@xmos.com> XCore target has -fno-use-cxa-atexit as default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194460 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
669496ba9fa753a238e3f0018b7a6235ec672727 12-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> This reverts commit r194435 and r194434.

Trying to get the bots green.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194450 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3e627f76c792ab0539933f1192cbd7845a68a9b3 12-Nov-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194434 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.cpp
db33419ecf2c608f1024366364fe64220ec4a057 10-Nov-2013 Roman Divacky <rdivacky@freebsd.org> Add gold plugin support to the FreeBSD link driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194350 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
bd3952758ce828a006d826979db642195792ac4d 09-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> This reverts commit r194330, r194329 and r194328.

The test was still failing on OS X and mingw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194334 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
1cc766fb3e62fedc5d99b103bcd0ec4aa3146859 09-Nov-2013 David Chisnall <csdavec@swan.ac.uk> Commit the changes to make libc++ the default on FreeBSD >= 10, rather than
just the test...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194333 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
a799d7db952e30b479d647fe35c00ee7360d7628 09-Nov-2013 David Chisnall <csdavec@swan.ac.uk> Add support for -fuse-ld=.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194328 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
24d91e6b5f90c4a057c3833915f9decf690780e1 07-Nov-2013 Sylvestre Ledru <sylvestre@debian.org> Ubuntu has published its Saucy release. 'Trusty Tahr' dev has just started. Add its support in Clang

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194198 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
1d5cce4f284519bdd1218c8f095462a518b47286 05-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> With this patch -Wwrite-strings is still implemented with the terrible
hack of passing -fconst-strings to -cc1, but at least the driver uses
the regular warning checking code path.

Since we don't support a warning that is DefaultIgnore in one language
but not in another, this patch creates a dummy C only warning in the same
group as the existing one to get the desired effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194097 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f632a0c29d4a124119312ef2bb36c1c8b49b0b93 04-Nov-2013 Rafael Espindola <rafael.espindola@gmail.com> clang-format this if.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193997 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
66dbb3f95e1666089acd3431792d02c623e459fc 03-Nov-2013 Bob Wilson <bob.wilson@apple.com> Default to use libc++ on OS X 10.9+ and iOS 7+.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193934 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c6911a2b1fc176e4d6053ed86506c17c3d8b0057 01-Nov-2013 Peter Collingbourne <peter@pcc.me.uk> SanitizerArgs: add ability to filter/diagnose unsupported sanitizers.

The thread, memory, dataflow and function sanitizers are now diagnosed if
enabled explicitly on an unsupported platform. Unsupported sanitizers which
are enabled implicitly (as part of a larger group) are silently disabled. As a
side effect, this makes SanitizerArgs parsing toolchain-dependent (and thus
essentially reverts r188058), and moves SanitizerArgs ownership to ToolChain.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193875 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
anitizerArgs.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
3bb1b5c953fc38d4b87525258cf27b7c908988b1 31-Oct-2013 Amara Emerson <amara.emerson@arm.com> [AArch64] Add some CPU targets for "generic", A-53 and A-57.

Enables the clang driver to begin targeting specific CPUs. Introduced a
"generic" CPU which will ensure that the optional FP feature is enabled
by default when it gets to LLVM, without needing any extra arguments.
Cortex-A53 and A-57 are also introduced with tests, although backend
handling of them does not yet exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193740 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
6d0943fc2dcb21927b31c07be7cdbf55d3688fed 29-Oct-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add -lm to sanitizer link arguments.

We'll need to intercept a few function in libm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193644 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2a9b75840ed7f18c36e988ea52d1f434bb004d4f 29-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Teach the driver to not try to use 'lib32' multilib spellings on ARM
which doesn't use that multilib. As a consequence, fix Clang's support
for cross compiling environments that were relying on this quirk to
ensure the correct library search path ordering.

This also re-instates the new test cases from Rafael's r193528 for
cross-compiling to ARM on Ubuntu 13.10 without any of the changes to the
existing test cases (they were no longer needed).

This solution was the result of a lot of IRC debugging and trying to
understand *exactly* what quirk was being relied upon. It took some time
for me to figure out that it was the use of 'lib32' is a multilib that
was throwing a wrench in the works.

In case you are thinking that its silly to use a multilib of 'lib' at
all, entertainingly, GCC does so as well (you can see it with the
.../lib/../lib/crt1.o pattern it uses), and the 2-phase sequence of
search paths (multilib followed by non-multilib) has observable (if
dubious) consequences. =/ Yuck.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193601 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
909f35a884045c658e5c4565499f113ee63dfc1d 29-Oct-2013 Bernard Ogden <bogden@arm.com> ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang

Allow users to disable or enable CRC subtarget feature.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193600 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fe88a10f396059d339d807a1737d6283412d38e0 29-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Doh, got this turned around. This is in fact the consistent ordering.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193596 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f4ad5adac038bf0ecddd5111485d47e8756e2b15 29-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Clean up the deeply misleading name of the "MultiLibSuffix". This is
actually a MIPS-only hack to shim in random ABI directory suffixes in
numerous places throughout the toolchain's path search. It shouldn't
appear to be anything more general or useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193595 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
76671edc68f1c86369c84c2a6c011dabd39e37e5 29-Oct-2013 Chandler Carruth <chandlerc@gmail.com> Cleanup comments and braces. No functionality changed, just trying to
record what is *actually* going on here as the comments existing in the
code are confusing at best, and in places outright misleading.

The API is even more misleading. Yay.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193577 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9a478245aecf58ca4e68ed629a840a74437e0ec1 29-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "Support cross linking to arm on ubuntu."

This reverts commit r193528 (and fixes).

It broke Chandler's setup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193554 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ba37ef953253e537147aaba68ee449dd63c67963 28-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Support cross linking to arm on ubuntu.

With this patch we correctly determine that ubuntu's ARM tree is not biarch
and use "lib" istead of "lib32".

Without this patch the search inside the arm tree for the crt files was failing
and we would end up trying to use the i686 ones in lib32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193528 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1a747829093ce59455685cdbe0aeff8d7b129d40 25-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Just detect a distro as being fedora or not.

We don't have any checks that depend on the version of fedora, so we can
simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193423 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
79cabd0793a624c1bc64c7c9e11575793c01b1e7 25-Oct-2013 Rafael Espindola <rafael.espindola@gmail.com> Merge two adjacent ifs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193419 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f779e65390ad331ff5ea68de40b0281f607b397c 24-Oct-2013 Bernard Ogden <bogden@arm.com> Add driver support for FP, SIMD and crypto defaults.

Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193367 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
80e90c2631e17a8fbb52834f2f802aa6ed93355a 24-Oct-2013 Bernard Ogden <bogden@arm.com> Set appropriate FPU default for Linux on v8

Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193365 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c427249cb79b77c3cd7a0855f854d2ff81618ddf 24-Oct-2013 Bernard Ogden <bogden@arm.com> Teach clang driver about Cortex-A53 and Cortex-A57.

Adds some Cortex-A53 strings where they were missing before.
Cortex-A57 is entirely new to clang.

Doesn't touch code only used by Darwin, in consequence of which
one of the A53 lines has been removed.

Change-Id: I5edb58f6eae93947334787e26a8772c736de6483

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193364 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
66b5dac8b70229dfe7c7cc882de21b1265a6cdea 24-Oct-2013 Tim Northover <tnorthover@apple.com> ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs

These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193328 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
69170e6e41e72c84fe5303540c1aa7ca9944ff18 23-Oct-2013 Richard Smith <richard-llvm@metafoo.co.uk> Split -fsanitize=bounds to -fsanitize=array-bounds (for the frontend-inserted
check using the ubsan runtime) and -fsanitize=local-bounds (for the middle-end
check which inserts traps).

Remove -fsanitize=local-bounds from -fsanitize=undefined. It does not produce
useful diagnostics and has false positives (PR17635), and is not a good
compromise position between UBSan's checks and ASan's checks.

Map -fbounds-checking to -fsanitize=local-bounds to restore Clang's historical
behavior for that flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193205 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
39e4b0fb309dc43d017d1b831a6b685c39bdedee 21-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Driver: Various string-related cleanups.

Also fixes some funky formatting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193079 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1db2e279114348d276e2dea03b8d6175743505e7 21-Oct-2013 Silviu Baranga <silviu.baranga@arm.com> Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193074 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9541141f4f131d76be609665b2a8500f770109c9 21-Oct-2013 Daniel Jasper <djasper@google.com> Expose -fmodule-name and -fmodule-map-file as driver options.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193069 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bf54855ac4476a54d9bafc5f67e433d3ac0fe512 20-Oct-2013 Peter Collingbourne <peter@pcc.me.uk> Revert r193022 and r193048. They broke the ubsan test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193057 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
acca8bcbe7b4c765caee75e62bfbf47f968a7bac 20-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Driver: libubsan_cxx depends on libubsan. Preserve the topological ordering, some linkers depend on it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193048 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
63d29e2452d557b7c882136bce01fb9349716bae 19-Oct-2013 Nick Lewycky <nicholas@mxc.ca> When building ubsan, link in ubsan parts first and sanitizer-common second, to
pick up the common bits ubsan actually needs. Also remove whole-archive when we
aren't trying to re-export the symbols.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193022 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b405c954815f2c05a0baac2e2996bf00406ce464 19-Oct-2013 Hans Wennborg <hans@hanshq.net> clang-cl: diagnose setting asm listing filename with multiple inputs

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193006 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4d612807447579d071b67568836de40fc1a1ed91 17-Oct-2013 Hans Wennborg <hans@hanshq.net> Make .asm a valid extension for assembly files

This is a common extension on Windows, and now clang will assemble them
instead of treating them as linker input which is the default for unknown
file types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192919 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
82a2911a94947e20ac4fd961b6322adf74ad9224 17-Oct-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Add support for asm listings (/FA and /Fa)

This adds support for outputing the assembly to a file during compilation.
It does this by changing the compilation pipeling to not use the integrated
assembler, and keep the intermediate assembler file.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192902 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
af7ed9e89074e37453cb2b9365b1882ab71163fb 17-Oct-2013 Daniel Sanders <daniel.sanders@imgtec.com> [mips] Added -mfp64 and -mfp32 options.

These options specify 64-bit FP registers and 32-bit FP registers respectively.

When using -mfp32, the FPU has 16x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
two single-precision registers).

When using -mfp64, the FPU has 32x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
with one single-precision register and has an additional 32-bits).

MSA requires -mfp64.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192899 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d5e59fc9df4cc7136e07c830ed08343a80a83b8e 16-Oct-2013 Eric Christopher <echristo@gmail.com> Rework ppc options handling into a features group.

This should have no functional behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192838 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5322a5569193af0304e430bcfa0c4bc4c4798c47 16-Oct-2013 Benjamin Kramer <benny.kra@googlemail.com> Driver: Factor duplicated code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192817 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9e6af9ddd505e68d494cec85d83ff893cf16d2df 16-Oct-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Enable frame-pointer elimination for -O1 and above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192815 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a6f5cc368bb6c996f771c37b0e95d81bf1ded76e 15-Oct-2013 Fariborz Jahanian <fjahanian@apple.com> ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
runtime. It will be silently ignored and regardless
of deployment target. // rdar://14803286


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192719 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e69cca48505098f1ca70b10f829b07526d6465bf 14-Oct-2013 Joerg Sonnenberger <joerg@bec.de> For NetBSD/current on X86 do not use libgcc and default to libc++.
Adjust linkage to make more sense for older releases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192615 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.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
ools.cpp
4e490e271ce3f0d4289b5115e000b55333c1b829 11-Oct-2013 Robert Lytton <robert@xmos.com> XCore target: add an xcore toolchain implementation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192437 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
d4705688feb77cbb8317d1c1a1fdbff5ccdf2d10 11-Oct-2013 Nick Lewycky <nicholas@mxc.ca> Fix typo in comment. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192412 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
71babaa2721b5954131a5d9320ebd34e49130f15 10-Oct-2013 Hans Wennborg <hans@hanshq.net> Locate VS InstallDir in the presence of newer runtime

This fixes getSystemRegistryString() in WindowsToolChain.cpp to
make sure that the VS version that it picks has an InstallDir.
Previously we would look for the highest version os VS and check
for InstallDir afterwards.

Patch by Yaron Keren!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192374 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
4e30cdf93fec46a6ceb326e57ceb46ad7e9c2c6c 10-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Support FSF Mips toolchain directories tree in the Clang driver.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1843

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192343 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
605b3d7ac0e7d1a1e12003a5b137fc948395cf25 10-Oct-2013 Hans Wennborg <hans@hanshq.net> Use KEY_WOW64_32KEY when reading the registry in WindowsToolChain.cpp (PR17033)

This exposes a 32-bit view of the registry even when Clang is built as a 64-bit
program. Since Visual Studio is a 32-bit application, this is necessary for us
to find it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192331 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
87d52eb5ae91f4b5f1ce8c9ee747217843d4ffcf 09-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Group MIPS-related options checking function in one place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192293 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
178bf0d7f0a2c09c3132c382ff7099a29440826f 09-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Make the isMipsR2Arch() function simpler - remove checking for
MIPS-arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192292 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
66751bc99c733107c8381c8d43bdeda254094a1a 09-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Do not check for options from the OPT_mips_CPUs_Group. All these
options are aliases now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192290 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ab5df7503abd0df6b815d11ebf271fa7650d83ae 05-Oct-2013 Simon Atanasyan <simon@atanasyan.com> Remove unused param from Linux::computeSysRoot().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192034 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
c0e83640ae656c76170b1389a5d72f440b1a7749 04-Oct-2013 Simon Atanasyan <simon@atanasyan.com> Revert r191947. The problem is not MIPS-specific and requires more
general solution.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191951 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bd55e97f4452b9a6fa18d6503c936d8b1c33029d 04-Oct-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] For MIPS '-fPIC -static' means to compile as -fPIC but link with
-static. So do not turn off the PIC flag if -static passed to the
driver in case of MIPS target.

http://llvm.org/bugs/show_bug.cgi?id=14693

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191947 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fc1a75b77c491f243e3c5de96fdff6394f5a82ee 03-Oct-2013 Tim Northover <tnorthover@apple.com> ARM: *-*-darwin-eabi triples should use AAPCS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191900 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fe7ed04204f838bab51878d049470a205cf820ad 01-Oct-2013 Amara Emerson <amara.emerson@arm.com> [ARM] Add -mfpu=none option to the driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191736 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.cpp
097595a5ee1019a8386206b76bf4893b9540f83b 29-Sep-2013 Daniel Jasper <djasper@google.com> Fix misspelling of -fmodules-decluse.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191640 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5c805e92a5f70a913bc3bfcd15c44875974c2111 28-Sep-2013 Simon Atanasyan <simon@atanasyan.com> Separate construction of bi-arch path suffix from construction of
multi-library path suffix.

The code calculates MIPS toolchain specific multi-lib path suffixes like
mips16/soft-float/el is moved to the separate function
findMultiLibSuffix(). This function called during GCC installation
detection and result is stored for the future using.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D1738

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191612 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
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
ools.cpp
4fe475a1a1d333d4ddeca386fa8dae3448103c3a 27-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: pass /FI options to fallback

We started parsing /FI in r191442, and now we can pass it on to the
fallback too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191537 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dea69a1149c5a77db69e037c9619a52d45fcf4a9 27-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove method that always returns true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191533 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4ab39dec0864706d1e69840b5d4c028f02f0b38f 25-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Produce an error if a -cc1 only option is passed to the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191380 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a8ffc16dc1c5b21c3fdb2b53a9c0eb5af5d3babb 24-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: fix passing optimization level to cl.exe in /fallback mode

We were previously mostly passing it through, but -O0 and -O3 are not valid
options to cl.exe.

We should translate -O0 to /Od and -O3 to /Ox. -O{1,2,s} get passed through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191323 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1413d629953d24647afaea7f0e0d16078d95ab7c 24-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: pass /nologo when falling back to cl.exe

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191316 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f26d8bc4406be1311a38fd1761d5ddeb2f5a38b6 24-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove a use of OPT_m_Joined.

This patch turns the -mv* hexagon options into aliases. We should really produce
errors for invalid versions in the driver, but this patch preserves the old
behavior for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191298 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
fc12c4aa20876bdf91bff98dc50eb68b4dd04b80 24-Sep-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and pass
this option to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191282 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c3c66879c329bf8caf4f0fcf62093c93a3f8c342 24-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove unused option.

gcc doesn't support "gcc -m sse" and this was not tested in clang and only
used for link argument on darwin, so this was very likely just a bug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191251 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
06b52b41a98fff69c1c68baf24316eafd8d5a47b 24-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Produce errors for unknown options.

This doesn't change a lot since clang still thinks it knows all of the
-f*, -m* and -W* options for example.

Other than the options clang explicitly claims to know, this fixes pr9701.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191249 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d85ec0e85952959a39a54a3b58e641e34878aecf 23-Sep-2013 Kostya Serebryany <kcc@google.com> Enable -fsanitize=use-after-return by default under -fsanitize=address

Summary:
We enable ASAN's use-after-return instrumentation at compile-time,
but still keep it disabled at run-time.
This enables the users to flip the flag at run-time using environment variable
ASAN_OPTIONS=detect_stack_use_after_return=1 instead of using a separate build.
If UAR detection is disabled at run-time, this extra compile-time instrumentation
costs very small slowdown. On SPEC 2006 14 tests are not affected at all,
4 tests get ~ 1% slowdown and 453.povray gets 4%.

Reviewers: samsonov

Reviewed By: samsonov

CC: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191186 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
dc40bf9ed03b5cca61d7de9fd0cc925a11935eb0 20-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: implement custom search for cl.exe in /fallback mode

This solves the problem of fallback onto ourselves if clang-cl
has been renamed to cl.exe and put on the PATH, as happens with
the VS integration.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191099 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4123b92f915fb27855ddaa294b0c7de7aa6c6274 20-Sep-2013 Alexander Potapenko <glider@google.com> [ASan] Do not imply -undefined dynamic_lookup when linking dylibs with -fsanitize=address.
Instead add the ASan runtime to the linker command line so that only the ASan API functions can be undefined in the target library.

Fixes http://llvm.org/bugs/show_bug.cgi?id=17275



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191076 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
c8ba0a0acd30f0b56d08a3a0947f68ac01a40730 19-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: implement /fallback mode

When this flag is enabled, clang-cl falls back to cl.exe if it
cannot compile the code itself for some reason.

The idea is to use this to help build projects that almost compile
with clang-cl, except for some files that can then be built with
the fallback mechanism.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191034 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
ools.cpp
ools.h
cdc532c78df8c559e3490f7006aa4a9130b70da9 19-Sep-2013 Amara Emerson <amara.emerson@arm.com> [ARMv8] Add crypto-neon-fp-armv8 -mfpu option in driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191001 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
76da17821632cf7d8f1b8faf4e011c2fd384a9e9 19-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Don't warn about overriding /MD with /MT, /Fo with another /Fo, etc.

I put in the warnings because MSVC has them, but I don't think they're very
useful.

Clang does not warn about overriding flags in general, e.g. it's perfectly
fine to have -fomit-frame-pointer followed by -fno-omit-frame-pointer.

We should focus on warning where things get confusing, such as with the
/TP and /TC options. In "clang-cl /TC a.c /TP b.cc", the user might not
realize that the /TP flag will apply to both files, and we warn about that.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190964 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
64228b6c0696f3579d40bab0ef40691ef4f41242 18-Sep-2013 Hans Wennborg <hans@hanshq.net> Add comment about exporting clang::driver::ArgStringList,
as suggested by Jordan on IRC. Also, use the unqualified name
in Job.cpp.

And while we're here, refer to StringRef with the unqualified
name, because we have a using directive for that too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190909 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
8c64c183054f6528aff4d6cca6aba462033ed1a1 18-Sep-2013 Reid Kleckner <reid@kleckner.net> Claim compatibility with VS 2012 by default

This will define _MSC_VER to 1700 by default and avoid linker errors
from /failifmismatch linker directives in the C++ standard headers.

Most people trying out the Visual Studio integration are using 2012,
since that's the only version that clang-format works with. This way
they don't have to pass funky -Xclang -fmsc-version=1700 flags just to
link against the standard C++ runtime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190908 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5c6ecf5a07317edc4a01f967a43eb3f76142d387 18-Sep-2013 Hans Wennborg <hans@hanshq.net> Revert r190902 and r190906

The first one broke the build, and the latter one made it worse.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190907 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
4832ee31e6ab96b77ad429ef9347fbf09c099f47 18-Sep-2013 Hans Wennborg <hans@hanshq.net> Revert "Move using directive from Job.h to Job.cpp" (r190902)

Seems like it was intentional to export ArgStringList as
driver::ArgStringList, and e.g. examples/clang-interpreter/main.cpp
uses it this way.

However, exporting it with a typedef seems like a more common way to do it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190906 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
f1666bbaba75eff59ae47e42d6d601e3d36781ff 18-Sep-2013 Hans Wennborg <hans@hanshq.net> Move using directive from Job.h to Job.cpp

I don't think it belongs in the header, but seems handy in the .cpp file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190902 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
dce3ce3686eed399b465742b1e2388915b438e05 17-Sep-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Don't try to handle files that are already ARC'ified, this is not possible currently.

rdar://14461559

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190880 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d8df3f70930b2251119ed363a7fde737c76af784 17-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: ignore compile-only options in link-only invocations.

Previously we would warn about unused arguments such as /MD when linking.
Clang already has logic to ignore compile-only options, e.g. for -D and -U.
This patch extends that to include clang-cl's compile-only options too.

Also, some clang-cl options should always be ignored. Doing this earlier
means they get ignored both for compilation and link-only invocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190825 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
57b1da1588a3f5785ad8bd5d9f2d795d685e1058 14-Sep-2013 Cameron Esfahani <dirty@apple.com> Clean up some Triple usage in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190737 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0f43a6daddd41722a4183a49b344f85b5aefbb33 14-Sep-2013 Eric Christopher <echristo@gmail.com> Add support for -ggnu-pubnames matching the llvm support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190729 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b029c5038b73fd093291f40059614b5421a45ec8 13-Sep-2013 Renato Golin <renato.golin@linaro.org> Moving Cortex-R cores to armv7r arch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190704 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5df4045db5e10408da7e33b0df7df553da2fee68 13-Sep-2013 Renato Golin <renato.golin@linaro.org> Add more Cortex CPUs and tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190703 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
2b33b7e978f5e47b6f0a1f264b77eb110966edf0 13-Sep-2013 Joey Gouly <joey.gouly@arm.com> [ARMv8] Change the naming of some options to be more consistent.

Clang side changes for LLVM r190692.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190693 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
aaaa2a1889fe882e7e41048e3b298ca594454eb1 12-Sep-2013 Hans Wennborg <hans@hanshq.net> Move the execution code from Compilation::ExecuteCommand to Command::Execute

I think it makes sense that a Command knows how to execute itself.

There's no functionality change but i rewrote the code to avoid the manual
memory management of Argv.

My motivation for this is that I plan to subclass Command to build fall-back
functionality into clang-cl.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190621 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ob.cpp
fc3389701ead32709ba84825e4c06651065da2c0 12-Sep-2013 Hans Wennborg <hans@hanshq.net> Move Compilation::PrintJob and PrintDiagnosticJob into Job::Print.

This moves the code to Job.cpp, which seems like a more natural fit,
and replaces the "is this a JobList? is this a Command?" logic with
a virtual function call.

It also removes the code duplication between PrintJob and
PrintDiagnosticJob and simplifies the code a little.

There's no functionality change here, except that the Executable is
now always printed within quotes, whereas it would previously not be
quoted in crash reports, which I think was a bug.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190620 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
ob.cpp
42ade496f79d2b9b1ff9fbdc30dd025c168be7a3 11-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Warn about overriding /MD with /MT etc.

This also bakes the /M options into a separate option group to make
them easier to refer to from the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190529 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
e4814134df9918ad1414d6f4c6308e0ec0e2fcd2 11-Sep-2013 Timur Iskhodzhanov <timurrrr@google.com> Fix the ASan dll_thunk path

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190516 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
6d0a8d56b4386bd3f1091bf15d88491ad1299913 10-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support building DLLs (PR17083)

This adds driver support for building DLLs (the /LD and /LDd flags).
It basically does two things: runtime selection and passing -dll and
-implib to the linker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190428 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b647552ab7dfdb32edf0081568db1fceec222397 10-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: use -fdiagnostics-format=msvc by default

This allows for navigating to errors within the MSVC IDE by clicking
on the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190378 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
535ae75f7b02b0d7adf76ed18f7f045efd54947c 06-Sep-2013 Hans Wennborg <hans@hanshq.net> Remove unused method Job::AddCommand.

I was going to update the comment referring to PipedJob, which was removed
some time ago, but then it turned out that this method is not actually used
at all.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190171 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
a6e7e496c96f1325afbbae87415776a6b86a1097 05-Sep-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Use .obj as extension for unnamed object files (PR17095)

We already use .obj as extension when the user provides a stem file
name (via /Fo), but were failing in the most basic case when the file
name is based on the input file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190071 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e9813b386cb3012d11006cf7d3b2019688a5f502 05-Sep-2013 Richard Smith <richard-llvm@metafoo.co.uk> Tweak implementation of -Wwrite-strings to better match the behavior of current GCCs:

* In C, as before, if the "warning flag" is enabled, warnings are produced by
forcing string literals to have const-qualified types (the produced warnings
are *not* -Wwrite-strings warnings). However, more recent GCCs (at least 4.4
onwards) now take -w into account here, so we now do the same.

* In C++, this flag is entirely sane: it behaves just like any other warning
flag. Stop triggering -fconst-strings here. This is a bit cleaner, but there's
no real functionality change except in the case where -Xclang -fno-const-strings
is also specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190006 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6155fbe1f6674eb0aab98156925938fec558e335 04-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove the -fuse-gold-plugin driver option.

* It was redundant with -flto.
* It was confusing since -uAnythingElse is a different option.
* GCC uses -fuse-linker-plugin, so it was not even a compatibility option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189976 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a673dbda6f67dbeb06aa2f99312200c8f5034cab 03-Sep-2013 Rafael Espindola <rafael.espindola@gmail.com> Use -### instead of -ccc-print-options.

Convert the last few tests using -ccc-print-options to -### and remove
-ccc-print-options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189802 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2ddffa1eda85892722cad4b9f459566e48c70baf 30-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Pass -incremental:no to linker when using ASan

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189664 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3e4d3a280b31bef39713cb0f111af951f5ef9aef 30-Aug-2013 Hans Wennborg <hans@hanshq.net> Revert r188531: "Windows ToolChain: add VS bin dir to PogramPaths"

This never really worked. Even if we find and execute link.exe in the VS bin dir
this way, link.exe wouldn't find the DLLs it needs, libraries, etc.

It also causes trouble when the user has multiple versions of VS installed,
one of them is in the path, but this code finds the other one (PR17041).

Revert until we can fix this properly.

> Windows ToolChain: add VS bin dir to PogramPaths
>
> We have a lot of fancy logic to find Visual Studio, which is currently used
> to set the system header include paths.
>
> Use the same code to set the ProgramPaths, which is used for finding programs
> such as link.exe. Previously, Clang would just search PATH for link.exe,
> but now it should find it if it's able to find Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189661 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
b69f9e0ab44e67ae4a36ab28e4e185078f2346ee 29-Aug-2013 Renato Golin <renato.golin@linaro.org> use the last passed -munaligned-access / -mno-unaligned-access

Passing inconsistent munaligned-access / mno-unaligned-access
flags, intentionally resulted in a warning and the flag
no-unaligned-access being used.

Gcc does, at least in practice, use the last flag in such a
case. This patch updates clang behaviour accordingly; use the
last flag or base alignment behaviour on the target (which
llvm will do if no flag is explicitly passed)

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189542 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
69ca5e263feb5d231a81bbd28f96bca6a630bd50 29-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Look for libstdc++ first on the clang install directory.

When sysroot is not set, look for libstdc++ first on the clang install
directory. Before this change if clang was installed alongside a gcc with
the same version as the system one we would select the system libstdc++.

Unfortunately this is hard to test as only the non-sysroot case is changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189536 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
324cc03788cbf97f680511b6a91adccff9d9c261 28-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Pass -debug to the linker when using -fsanitize=address

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189496 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cf5691edd7460833b6f823dbe5b57e32fb7a93ad 28-Aug-2013 Hal Finkel <hfinkel@anl.gov> Revert r189440 - Disable loop vectorizer unrolling when no unrolling requested

As Chandler pointed out, we should not be using -backend-option because this
will cause crashes for users of the tooling interface, etc. A better way to fix
this will be to provide the unrolling pass-manager flag to the loop vectorizer
directly.

Original commit message:

Disable loop vectorizer unrolling when no unrolling requested

In addition to the regular loop unrolling transformation, the loop vectorizer
can also unroll loops. If no unrolling has specifically been requested (by
-fno-unroll-loops), and the loop vectorizer will be used, then add the backend
option to (also) prevent the loop vectorizer from unrolling loops.

I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when
-fno-unroll-loops is provided is the desired behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189441 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f95b589220c9b2d28598a1e47831e75e890b7c80 28-Aug-2013 Hal Finkel <hfinkel@anl.gov> Disable loop vectorizer unrolling when no unrolling requested

In addition to the regular loop unrolling transformation, the loop vectorizer
can also unroll loops. If no unrolling has specifically been requested (by
-fno-unroll-loops), and the loop vectorizer will be used, then add the backend
option to (also) prevent the loop vectorizer from unrolling loops.

I confirmed with Nadav (off list) that disabling vectorizer loop unrolling when
-fno-unroll-loops is provided is the desired behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189440 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3c4da0c4c84521367e84632f5f627b3439e61bcd 27-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support -fsanitize=address

This exposes the -fsanitize=address option and adds the runtime library
to the link command.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189389 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
55ee1ebeb0b9f7b26919c325582f1e6a05df4ec8 27-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Warn that -O4 is the same as -O3.

We error on -O5 and higher. While it is tempting to do the same for -O4, I
agree with Jordan Rose: we should warn for a release at least first.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189369 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
168de198e5b2333b9135a5c00546da558dbb8527 26-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Simplify now that -O4 just maps to -O3 and -O is an alias of -O2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189218 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0affc67389171834adf113e3a0422a32218a6192 26-Aug-2013 Chandler Carruth <chandlerc@gmail.com> Teach the Linux toolchain about more modern Gentoo installations of GCC
which add another wrinkle to the installation of the libstdc++ headers.

Add at least some basic testing of the weirdnesses of Gentoo's layout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189212 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
6db9088fc496acfc365485178d4712aba41c61ee 25-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Produce an error when trying to link with -emit-llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189193 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
02ab7d3c0e1e5278ca0451dc846aedcf45e623cf 24-Aug-2013 Renato Golin <renato.golin@linaro.org> Add gcc ARM flags -munaligned-access / -mno-unaligned-access

clang already had a mstrict-align which mentiones "Force all memory
accesses to be aligned (ARM only)". On gcc arm this is controlled by
-munaligned-access / -mno-unaligned-access. Add the gcc versions to
the frontend and make -mstrict-align and alias to -mno-unaligned-access
and only show it in clang -cc1 -help.

Since the default value for unaligned accesses / strict alignment
depends on the tripple, both the enable and disable flags are added.
If both are set, the no-unaligned-access is used.

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189175 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
45bd2946df2ff7460b7daf06a4fe34de8a58b8cf 24-Aug-2013 Renato Golin <renato.golin@linaro.org> Add the -ffixed-r9 flag for ARM.

This patch adds the -ffixed-r9 flag to clang to instruct llvm to
globally preserve the contents of r9. The flag is added to the newly
created ARM specific group.

While at it, also place marm / mno-thumb in that group.

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189174 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3b0f62b8c05131df90ca7c9fe054c6c960594e4b 23-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't imply -flto with -O4.

We now saturate at -O3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
223ccb4328e7b22db2aa3559c8fca1fd3343820d 23-Aug-2013 Shuxin Yang <shuxin.llvm@gmail.com> Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.

One step toward differentiating following two commands:
clang -O3 -flto a.c -c, and
clang -O3 -emit-llvm a.c

Thanks many awesome folks for clarifying things.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@189148 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
bc1e54587bf1ed18abadc566423777ddb3be78ac 21-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Move the logic for selecting the last feature in the command line to the driver.

This is a partial revert of r188817 now that the driver handles -target-feature
in a single place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188910 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
146dbbff2c1ed5f97d0b71f9a9f0a45b929ec10b 21-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the handling of -target-feature.

No functionality change other than changing the order of -target-feature
relative to other -cc1 command line arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188906 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
b330e4078cf2d83f93619516580d183a618e9a98 21-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the handling of -target-cpu (-cc1, -cc1as) and -mcpu (gold plugin).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188837 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
c84ed54f9786638c228fdc9b4db9920fa676d48d 20-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the logic for handling -m* options and fix pr16943.

This moves the logic for handling -mfoo -mno-foo from the driver to -cc1. It
also changes -cc1 to apply the options in order, fixing pr16943.

The handling of -mno-mmx -msse is now an explicit special case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188817 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7f16f2d057f5e0795ead9306a27b394d5a52e8b6 20-Aug-2013 Tim Northover <tnorthover@apple.com> ARM: default to arm1176jzf-s for hard-float platforms.

It makes no sense to try and compile for arm7tdmi when we're targeting
something like gnueabihf. Although not strictly the most basic hardware
conceivable, I believe arm1176jzf-s is a reasonable compromise (that can always
be overridden explicitly if needed) since it's still in reasonably common use
unlike earlier cores.

Patch by Stephen Kelly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188796 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
f064ad5beaaa133752135456b33ded1c18b5d918 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Re-apply r188666

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188675 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
anitizerArgs.cpp
3c6c822327af1ed37de93cfd6cf8d85ae7709cac 19-Aug-2013 NAKAMURA Takumi <geek4civic@gmail.com> clang/Driver: [PR12920] Don't forward any -W arguments to gcc-as and gcc-ld.

AFAIK, there are no -W options for gcc-as and gcc-ld.
It caused failure to build clang with gcc-4.7 on cygwin.

FIXME: Could we recategorize Options for gcc-as and gcc-ld?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188668 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fab968ff4953fce326b1e2e83a064382dec8fa51 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Revert r188666: it breaks the buildbots

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188667 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
e34906910850e2be2d4ff5c5f94e7ef92128b2b0 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Fix PR16768: properly report malformed sanitizer blacklist file contents

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188666 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
1b8f12d46c10169bb949372ec5fc4c58afc2ced1 19-Aug-2013 Alexey Samsonov <samsonov@google.com> Move SanitizerArgs to the clang Driver

Summary:
This change turns SanitizerArgs into high-level options
stored in the Driver, which are parsed lazily. This fixes an issue of multiple copies of the same diagnostic message produced by sanitizer arguments parser.

Reviewers: rsmith

Reviewed By: rsmith

CC: chandlerc, eugenis, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188660 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
anitizerArgs.cpp
anitizerArgs.h
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
09c2454e765289cae1309b819b6308fa543594c6 16-Aug-2013 Hans Wennborg <hans@hanshq.net> Windows ToolChain: add VS bin dir to PogramPaths

We have a lot of fancy logic to find Visual Studio, which is currently used
to set the system header include paths.

Use the same code to set the ProgramPaths, which is used for finding programs
such as link.exe. Previously, Clang would just search PATH for link.exe,
but now it should find it if it's able to find Visual Studio.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188531 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
ebc313d502b8fbfb7cdebd44c52cfc6490fd8dc7 15-Aug-2013 Renato Golin <renato.golin@linaro.org> make arm-use-movt available for all ARM

This updates clang according to a pending patch for llvm to
rename of the -arm-darwin-use-movt to arm-use-movt to make
it available for all of ARM.

note: please apply this close to the llvm change.

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188488 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ba7fd42d78f67d085f90c307a013dc37ef8e791a 15-Aug-2013 Joerg Sonnenberger <joerg@bec.de> Build unwind tables by default on NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188463 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
14605ff6affc04191a0064f688c56082b1c93791 15-Aug-2013 Joerg Sonnenberger <joerg@bec.de> Use the integrated assembler on NetBSD/powerpc by default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188462 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
5d27a512882225297aa8fb55e9cc33a02d23f4b7 14-Aug-2013 Peter Collingbourne <peter@pcc.me.uk> Add support for -fsanitize-blacklist and default blacklists for DFSan.
Also add some documentation.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188403 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
f15b26cf378ac4706a861444fccb177f6116087e 14-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Enhance the clang -v gcc debug printing to skip obviously bad and duplicate paths.

Otherwise it lists all files (e.g. shared libraries) that happen to be in the
same paths the GCC installations usually reside in.

On a x86_64 Debian 7 system with i386 multilibs.
before: clang -v 2>&1|wc -l
3059
after: clang -v 2>&1|wc -l
10

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188400 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
cb2e182b404f19d6b039b072cec4acdc4366880c 14-Aug-2013 Shuxin Yang <shuxin.llvm@gmail.com> revert 188352

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188353 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5dbab41b989c71ee80c74d7cfc50be43266ba5a6 14-Aug-2013 Shuxin Yang <shuxin.llvm@gmail.com> Driver::IsUsingLTO() no longer return true when seeing -emit-llvm.

The rationale for this change is to differentiate following two situations:
1) clang -c -emit-llvm a.c
2) clang -c -flto a.c

Reviewed by Eric Christopher. Thanks a lot!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188352 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2388b77626beea9fb8a57fbca35b605764d911b2 14-Aug-2013 Hans Wennborg <hans@hanshq.net> Driver: Forward -Wl, and -Xlink arguments when using windows linker

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188346 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5db9527a2e582c17bc835e6e2a5a8178efa5a1e8 14-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support /link option and set target to win32

This adds support for the /link option, which forwards
subsequent arguments to the linker.

The test for this will only work when targetting win32.
Since that's the only target where clang-cl makes sense,
use that target by default.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188331 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
1f8d663089adf189f3081d4a31f4fd30c74c3ac3 14-Aug-2013 Nick Lewycky <nicholas@mxc.ca> Link in the ubsan runtime when building shared objects.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188325 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
73052bf669d3fe4c202cff2792cfe215cf5727be 13-Aug-2013 Hans Wennborg <hans@hanshq.net> Handle "--" explicitly in the driver

Anything that comes after -- is treated as an input file. This
used to be handled automagically by the option parsing library,
but after LLVM r188314, we should handle it ourselves.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188316 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
99662a156055de9f46b3cababbf7032e68ed961b 13-Aug-2013 Arnold Schwaighofer <aschwaighofer@apple.com> Move logic to enable the vectorizer to clang

We used to decide whether to really vectorize depending on the optimization
level in PassManagerBuilder.

This patch moves this decision to the clang driver. We look at the optimization
level and whether the f(no-)vectorize is set and decide whether to vectorize.

This allows us to simplify the logic in PassManagerBuilder to just a check for
whether the vectorizer should run or not.

We now do the right thing for:
$ clang -O1 -fvectorize
$ clang -fno-vectorize -O3

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188280 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5f15f4daf0e225ea8463fe2ef522c009c95ffc9c 13-Aug-2013 Robert Lytton <robert@xmos.com> Add XCore target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188258 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9c0ed9122da2ec12798459328ba63511b1aab7d4 13-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Sink /Fe and /Fo diagnostic code into BuildActions

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188226 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c65c72d198b02c0d90c6bcced655e4bb11ed3f37 12-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Support the /Fe option

This is used to name the linked output file.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188210 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
f86c13921f6e2f586f4613ab3cb4a84c8693541f 12-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Expand warning about /TC and /TP override, and expand test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188190 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c613b67f4f3e5d11d6af6426fd9b8b6a197d2b6b 12-Aug-2013 Jack Carter <jack.carter@imgtec.com> [Mips] MSA frontend option support

This patch adds -mmsa and -mno-msa to the options supported by
clang to enable and disable support for MSA.

When MSA is enabled, a predefined macro '__mips_msa' is defined to 1.

Patch by Daniel Sanders


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188184 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a2148240bd94ef659a9195b87e9cd0023536c01f 10-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Simplify now that llvm::sys::current_path checks $PWD.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188128 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a902511dd22624b15cc61e36d167d1cf3549bc74 08-Aug-2013 Stephen Hines <srhines@google.com> Update Clang for merge to r187914.

Fixups related to OptParser.td moving into LLVM (from Clang).

Add libLLVMOption dependency.

Android.mk changes:
- Arg.cpp
- ArgList.cpp
- Option.cpp
- OptTable.cpp
- OptParserEmitter.cpp
- LambdaMangleContext.cpp
+ ASTTypeTraits.cpp
+ MangleNumberingContext.cpp
+ MicrosoftVBTables.cpp

Change-Id: I0aef80d90be9297cd1d5b5a08134cb6de2af4d2e
ndroid.mk
746974d52791c6394a0ca16f13c3b32f9129f12a 09-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Don't pass /defaultlib to the linker

Since r187945, clang-cl will add the runtime library dependency to
the .obj file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188086 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ed5f28fd8bdb0ea39a28f4ade6b3ab57f0c8f780 09-Aug-2013 Benjamin Kramer <benny.kra@googlemail.com> Add a convenient way to compare GCCVersions without creating temporary objects.

No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188084 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
48d0f0788998f10b769696910799255430f2a3d8 09-Aug-2013 Alexey Samsonov <samsonov@google.com> Fixup for r188058: assume hasAsanZeroBaseShadow() is false if ASan is not needed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188068 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
8bdc92c01eeb345042b99650c6860b6aaa683ad8 09-Aug-2013 Alexey Samsonov <samsonov@google.com> Make SanitizerArgs parsing toolchain-independent

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188058 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
anitizerArgs.h
oolChains.cpp
ools.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
ools.cpp
f0f9891b683646f734acb74d938460b354ded3bb 08-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: use MS C++ ABI

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188000 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a32c52367ac31982fa7c2a7ba959dadaf3693f3b 08-Aug-2013 Reid Kleckner <reid@kleckner.net> Revert "clang-cl: Hook up /Za to prevent adding oldnames.lib dependency"

This reverts commit r187991 and adjusts the comment. /Za is much more
involved, and we don't want to give anyone the impression we actually
support it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187998 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bccf68f0901f6457ff00874ef57644100a1c7a59 08-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Hook up /Za to prevent adding oldnames.lib dependency

The /Za flag should probably do more, but let's start with this.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187991 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1e9fdc1a8b090c2c419c64e429c3f6595e86bae9 08-Aug-2013 Alexey Samsonov <samsonov@google.com> Factor out parsing sanitizer arguments to a separate function

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187977 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.cpp
anitizerArgs.h
442c60a92b6e3980e0f69a195a264ec2ffa2dd6d 08-Aug-2013 Alexey Samsonov <samsonov@google.com> Move SanitizerArgs implementation from .h to .cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187972 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
anitizerArgs.cpp
anitizerArgs.h
ools.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
ools.cpp
4ac73c7514f9e836b4d9781738f333c5cb91cb63 08-Aug-2013 Stephen Hines <srhines@google.com> Merge commit '51e75aecf4fb303b91c9e54fd88e3509e5acc7a6' into merge-20130807

Conflicts:
lib/Basic/Targets.cpp
lib/Sema/SemaDeclAttr.cpp

Change-Id: If457223ecbee9e43c73d15333bf10d36590d05c4
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
ools.cpp
ools.h
2eeed711beec49dfad5d3a3f16fdfca4b2f3acf0 08-Aug-2013 Peter Collingbourne <peter@pcc.me.uk> DataFlowSanitizer; Clang changes.

DataFlowSanitizer is a generalised dynamic data flow analysis.

Unlike other Sanitizer tools, this tool is not designed to detect a
specific class of bugs on its own. Instead, it provides a generic
dynamic data flow analysis framework to be used by clients to help
detect application-specific issues within their own code.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187925 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
909930fc19ff69b08f2ea6f6e2996d24c816f311 07-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Use .obj as object file extension instead of .o

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187840 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
ab50ccd7f756a1e617ebd32471ba9565bb240d37 07-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Implement support for the /Fo option

This implements support for the /Fo option, which is used
to set the filename or output dir for object files.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187820 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4c587532e108725e38c5546976ee81c8bea04bb7 06-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: Implement the /Tc, /TC, /Tp and /TP options.

These are used to specify source files, and whether to treat source
files as C or C++.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187760 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
bd77c59acc58e797756b0fcc6739319587e95d85 03-Aug-2013 Bob Wilson <bob.wilson@apple.com> Only use the Darwin linker's -export_dynamic option with supported versions.

Related to <rdar://problem/14578094>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187680 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
09c3463441ffca4bde5e8612222f8cc6ae0ec9a5 03-Aug-2013 Hans Wennborg <hans@hanshq.net> Re-commit r187637: "clang-cl: add more options"

> This adds a bunch of options to clang-cl. Notably, this includes
> all the options that get passed when doing a default build of a
> command-line project with msbuild.exe in Debug and Release modes,
> and I believe all flags from Reid's original patch.

The original commit was reverted in r187640 after it broke the Mac build.

This should now be fixed, by Clang r187668, LLVM r187675, and putting
a -- before %s in the test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187679 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ac253c4da163fb5ea43c612e1b52f4f1224e2c2 02-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert last use of st_dev in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187654 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e7a9a67f9842dcdc13d322a23110f42bd025a306 02-Aug-2013 Hans Wennborg <hans@hanshq.net> Revert r187537 "clang-cl: add more options"

It broke the "phase1 - sanity" buildbot. Reverting until
we can figure out what's going on.

And Eric says it broke all current Mac builds actually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187640 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ac8b5f53d4646b4f76565a03ae2a85b6c67cdcc1 02-Aug-2013 Hans Wennborg <hans@hanshq.net> clang-cl: add more options

This adds a bunch of options to clang-cl. Notably, this includes
all the options that get passed when doing a default build of a
command-line project with msbuild.exe in Debug and Release modes,
and I believe all flags from Reid's original patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187637 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d836061745ec078e61b6532dddcb968e503dfb06 02-Aug-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3."

This reverts commit r187630.

Looks like it is breaking the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187633 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bd30bf8ac99b433e221cdf444cc2d11fc1753984 02-Aug-2013 Nadav Rotem <nrotem@apple.com> If -fslp-vectorize or -fno-slp-vectorize are given, honor this selection. If no flag is given, enable it for -O3.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187630 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f94c0600416c2457aeeda6823f0cf66782af3427 01-Aug-2013 Nadav Rotem <nrotem@apple.com> Enable the SLP-vectorizer by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187596 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f10fa8d04773410860cd347aebf77c27434aaf26 01-Aug-2013 Hans Wennborg <hans@hanshq.net> Options: Use AliasArgs for -O -> -O2 translation.

This way we can do the translation in the .td file rather than manually.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187583 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b793f0d3448a15277cd6b6cc4ba558ded39a8084 01-Aug-2013 Tim Northover <tnorthover@apple.com> AArch64: initial NEON support

Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187568 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
d145ce71fbe25c578f7d6a56320b64abf808ba78 01-Aug-2013 Hans Wennborg <hans@hanshq.net> Remove the SUPPORT_ALIASARGS define

It is not needed after LLVM r187546.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187550 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
riverOptions.cpp
b087a5d13d6edd8b54fbb0683d6b9d1768a86c47 01-Aug-2013 Hans Wennborg <hans@hanshq.net> Make -m[no-]pascal-strings an alias of -f[no]pascal-strings in the .td file

This way we don't have to translate it manually in Clang::ConstructJob.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187547 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
438292860a49f6998dff4db0b9ff04bcc0d5ae33 01-Aug-2013 Hans Wennborg <hans@hanshq.net> Option parsing tables: pick up AliasArgs from the OPTION macro.

This depends on LLVM r187537.

The SUPPORT_ALIASARGS macro will be removed once all option parsing
clients have been updated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187538 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
riverOptions.cpp
78d0fbfe3aa0dcf158fed95a51460e5d769447ee 31-Jul-2013 Hans Wennborg <hans@hanshq.net> clang-cl: add the /c, /W0 and /W1 options

This adds a few more clang-cl options. It also exposes two core clang
options to the clang-cl mode: we need to be able to claim --driver_mode
so it doesn't show up as unused in cl mode, and we need -### for tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187527 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
adbb455012fff8c9a72ddf24290d25d035fd056d 31-Jul-2013 Hans Wennborg <hans@hanshq.net> Fix a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187502 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
28803ba0cd8a5d13d104af96aadf72dca4160a7f 31-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Find a better compromise with the default library search paths used by
Clang when linking and using a GCC installation from a GCC
cross-compiler.

This was desired already by two special case platforms (Android and
Mips), and turns out to be generally (if frustratingly) true. I've added
a substantial comment to the code clarifying the underlying assumptions
of doing actual cross compiles with Clang (or GCC for that matter!) and
help avoid further confusion here.

The end result is to realize that fully general form of PR12478 cannot
be resolved while we support existing cross-compiling GCC toolchains,
and linking with them (namely, linking against their libgcc and
libstdc++ installs). GCC installs these target libraries under
a target-specific prefix but one that may not be available within the
actual sysroot in use. When linking in this world, GCC works and Clang
should as well, but caveat emptor: DSOs from this tree must be
replicated and rpath-fixed to be found at runtime within the sysroot.

I've extended the cross compile test cases to cover these issues by
pointing them at a sysroot and actually checking the library search
paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187466 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6365ab91a0cf2f20c73ea9c39b55c14ab438018e 30-Jul-2013 Chandler Carruth <chandlerc@gmail.com> Start keeping track of what work was done to detect a GCC installation
on the system, and report it when running the driver in verbose mode.
Without this it is essentially impossible to understand why a particular
GCC toolchain is used by Clang for libstdc++, libgcc, etc.

This also required threading a hook through the toolchain layers for
a specific toolchain implementation to print custom information under
'clang -v'. The naming here isn't spectacular. Suggestions welcome.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187427 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
6981330cc231e4e2ccbd38679209e04b776483eb 27-Jul-2013 Hans Wennborg <hans@hanshq.net> clang-cl: add support for the /? and /help options

This establishes a new Flag in Options.td, which can be assigned to
options that should be made available in clang's cl.exe compatible
mode, and updates the Driver to make use of the flag.

(The whitespace change to CMakeLists forces the build to re-run CMake
and pick up the include dependency on the new .td file. This makes the
build work if someone moves backwards in commit history after this change.)

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187280 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ea7fb0ce25acc04664a2e7c2b24af03cef2c0d1f 26-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> [PowerPC] Support powerpc64le as a syntax-checking target.

This patch provides basic support for powerpc64le as an LLVM target.
However, use of this target will not actually generate little-endian
code. Instead, use of the target will cause the correct little-endian
built-in defines to be generated, so that code that tests for
__LITTLE_ENDIAN__, for example, will be correctly parsed for
syntax-only testing. Code generation will otherwise be the same as
powerpc64 (big-endian), for now.

The patch leaves open the possibility of creating a little-endian
PowerPC64 back end, but there is no immediate intent to create such a
thing.

The new test case variant ensures that correct built-in defines for
little-endian code are generated.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187180 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
003e1dcafcdb757a893b031431620313ee7ecbbf 26-Jul-2013 Eli Friedman <eli.friedman@gmail.com> Fix gcc search for cross-compiler on Ubuntu 13.04.

Just more craziness to find crtbegin.o etc.

Patch by Stephen Kelly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187175 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
19caff4f9a38c23bffdc8ff801a36026ab61ebd7 26-Jul-2013 Hans Wennborg <hans@hanshq.net> Options.td: fold the NoForward flag into DriverOption

They seemed to have the same implications, and this makes for one
less flag to worry about.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187168 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
73168db4feadbb5e8915e71369aad33292860427 25-Jul-2013 David Blaikie <dblaikie@gmail.com> Don't forward all assembler arguments untouched to -cc1as

Use the same filtering for assembly arguments to -cc1as as we do for
-cc1, this allows a consistent (& more useful) diagnostic experience for
users (rather than getting an error from -cc1as (which a user shouldn't
really be thinking about) about --foo, they get an error from clang
about --foo in -Wa,)

I'm sort of surprised by the separation of -cc1as & the separate
argument handling, etc, but at least this removes a little bit of the
duplication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187156 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8f4269a401814bbe27ff2756131e398fd1708fac 25-Jul-2013 Eli Bendersky <eliben@google.com> Simplify code - no functionality change.

getToolChain().getTriple().getArch() can be replaced by getToolChain().getArch()



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187082 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f3ecf899b55216d6de90ad67e583df064716cfc6 24-Jul-2013 Eli Bendersky <eliben@google.com> Pass -fno-math-builtin from the Clang driver to -cc1 for the l32 arch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@187061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7d3240d3c949b8d0697a23a202cceba4d1a2d21f 23-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove the -ccc-echo option that is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186970 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
c2f531a1300cc7a79cb8dde12cb993da82beba1b 19-Jul-2013 Hans Wennborg <hans@hanshq.net> Add a cl.exe compatible driver mode

The mode doesn't actually do anything yet, but this provides a
way to get into it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186720 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cdbc3b36bd6167fcb1e2de080e0d9bcd35b166ea 19-Jul-2013 Akira Hatanaka <ahatanaka@mips.com> [mips] Add support for command-line options -mno-check-zero-division and
-mcheck-zero-division.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186710 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5c92b9ab4e4dce3233ea3e400a02c443f9afd372 19-Jul-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Add -march= command-line option


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186694 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
0e373ecd52d595ebfc3054efdbacd7e6815bcd1e 19-Jul-2013 Richard Sandiford <rsandifo@linux.vnet.ibm.com> [SystemZ] Enable frame-pointer elimination for -O1 and above

Copies the x86 behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186674 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
33530b8e99085f736b0af5e1bc8fedaf80b5c90e 18-Jul-2013 Hans Wennborg <hans@hanshq.net> Address -Wreorder warning in Driver.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186617 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
76b86c2e79a58910a641d449f229889d671d8a38 18-Jul-2013 Hans Wennborg <hans@hanshq.net> Turn Driver::CCCIsCXX and CCCIsCPP into a single Mode enum,
and add a new option --driver-mode= to control it explicitly.

The CCCIsCXX and CCCIsCPP flags were non-overlapping, i.e. there
are currently really three modes that Clang can run in: gcc, g++
or cpp, so it makes sense to represent them as an enum.

Having a command line flag to control it helps testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186605 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b17a2c119877b47cb3fb68c76a91dfe4d8cc6199 17-Jul-2013 Hans Wennborg <hans@hanshq.net> Option parsing tables: remove some unnecessary #defines

Also make some strings static and add missing #undef's

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186518 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
riverOptions.cpp
b470d1a54877e7b3622e4cbdeae423c6d51be696 17-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the simpler is_directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186487 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d965f95daa97097c8ddc5e1165ceae585a888719 16-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Update for llvm API change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186448 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
d58915eae3849225070230c3b89ebf3d987a3270 15-Jul-2013 Aaron Ballman <aaron@aaronballman.com> Replacing an empty switch with its moral equivalent. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186318 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b960232518a1cd79c5f64ab5ef54c88e34660191 15-Jul-2013 Craig Topper <craig.topper@gmail.com> Use llvm::array_lengthof to replace sizeof(array)/sizeof(array[0]).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186300 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
riverOptions.cpp
ypes.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
ools.cpp
1ec4a86a867fc04f35d13bc9e33b04cf2171fe41 05-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm::sys::fs::createTemporaryFile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185717 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6b9240e058bf3451685df73fc8ce181b3046e92b 05-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl& for function arguments instead of SmallVector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185715 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
09d19efaa147762f84aed55efa7930bb3616a4e5 04-Jul-2013 Craig Topper <craig.topper@gmail.com> Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185610 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9e0b647bccb9e22936e1dacbe33ec7f941764d87 03-Jul-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Fix PR16454: Don't #include altivec.h when preprocessing assembly.

When the -maltivec flag is present, altivec.h is auto-included for the
compilation. This is not appropriate when the job action is to
preprocess a file containing assembly code. So don't do that.

I was unable to convert the test in the bug report into a regression
test. The original symptom was exposed with:

% touch x.S
% ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S

I tried this test (and numerous variants) on a PPC64 system:

----------------------------------------------------------------------------
// RUN: touch %t
// RUN: %clang -maltivec -S %t -o - | FileCheck %s

// Verify that assembling an empty file does not auto-include altivec.h.

// CHECK-NOT: static vector
----------------------------------------------------------------------------

However, this test passes for some reason even on a clang built
without the fix. I'd be happy to add a test case but at this point
I'm not able to figure one out, and I don't want to hold up the patch
unnecessarily. Please let me know if you have ideas.

Thanks,
Bill


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185544 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
766633416daaafdf5ad85aa9e1f18e7163cce92c 03-Jul-2013 Rafael Espindola <rafael.espindola@gmail.com> We don't need to know the OpenSUSE version, so don't parse it.

Patch by Johannes Obermayr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185537 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8ed38d8046e642c2d81775ada2ecee821f2e2a02 03-Jul-2013 Manman Ren <mren@apple.com> Debug Info: set default to gdwarf-2 for Darwin.

Darwin systems currently do not support dwarf version 3 or above. When we are
ready, we can bump the default to gdwarf-4 for Darwin.

For other systems, the default is dwarf version 3, if everything goes smoothly,
we can bump the version to 4.

rdar://13591116


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185483 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
oolChains.cpp
cbed3bfe79bbd16ced68078c7385bd21151f44cd 27-Jun-2013 Joey Gouly <joey.gouly@arm.com> Add support for passing v8fp options via -mfpu.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185075 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4ec8d5b63d3e2a2c0d9f35243e5f798a89cd97bd 26-Jun-2013 Joey Gouly <joey.gouly@arm.com> Add support for passing '-target armv8' through the Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184970 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
da6d1dff3845b04fddc62f8d902c266fcc583bb7 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove PathV1.h use from WindowsToolChain.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184906 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
7b6301f7f5f9c0ead17a448aad7c456b3252bb45 26-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove PathV1.h usage from ToolChains.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184902 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
40e6b30884d54c480f37c38beaa43390de7feb9e 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use simpler version of llvm::sys::fs::exists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184857 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f8edb990b845691d2c4e8553a7bdf72e292d7734 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Don't use PathV1.h in Tools.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
829e88d5ccd11381d8844c9825b5b36e9a9ea983 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the simpler version of llvm::sys::fs::exists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184855 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8db7ec0779d9ed6a8d4762bfeda16bdc3f8f2133 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the new llvm::sys::EnvPathSeparator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184851 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4ea53ae85cd0388f3138c6d48604fc9407174dcc 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Add r184803 back now that the bug in unique_file has been fixed.

Original message:

Use the new PathV2 instead of implementing the logic in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184825 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
510312a69f2de521fc4450e67a40f03a4a217d44 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Revert "Use the new PathV2 instead of implementing the logic in clang."

This reverts commit 184803 while I debug the failures on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184818 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
fa09383ce9d6ea81a8fe86b2f26519c7a1c165fb 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove PathV1.h from Driver.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184807 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4a67613a9afaa8307c9de0d1d546a4316d335470 25-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the new PathV2 instead of implementing the logic in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184803 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f75ece4a7e77583d9ac8172e3e44e0131a4061f4 24-Jun-2013 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed to avoid the
"argument unused during compilation" warning.

rdar://14240566

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184776 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e8486301079d7487173555da330eedf5221030b5 24-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert some uses of llvm::sys::Path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184774 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
005835d6279ed210527368cb78475f8c155123e3 24-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the simpler version of llvm::sys::fs::exists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184770 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
de2b523b9a2a32ff27e0689413c078c2cf87e666 24-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert last use of PathV1.h in Compilation.cpp

The way we decide which file to remove is fairly odd. I took a quick look at
maybe changing that, but it would be a more work than I want to put at this
right now, so I left pair of FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184766 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
8ce9054eb9051008b6a9850714701099d2a016b1 24-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Convert a use of PathV1.h

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184753 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
80a393ead5632b8f3343c0348e8c50157cd7e922 24-Jun-2013 Chandler Carruth <chandlerc@gmail.com> The profile library must come before the C library so that it can use
atexit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184708 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9db37cd0aa8fa6ec840bfd9166090be5a39b691a 23-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Fix the addition of Clang's profile runtime library to the link step
when specifying --coverage (or related) flags.

The system for doing this was based on the old LLVM-hosted profile_rt
library, and hadn't been updated for Linux to use the new compiler-rt
library. Also, it couldn't possibly work on multiarch or biarch systems
in many cases. The whole thing now works much the same as the sanitizer
libraries that are built and used out of the compiler-rt repo.

Note that other target OSes haven't been updated because I don't know if
they're doing anything special with the installation path of profile_rt.
I suspect however that *all* of these are wrong and would encourage
maintainers of each target to take a hard look at how compiler-rt
runtime libraries are linked on their platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184666 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d79486a19298af172dfa085d536e178e7b5ff20b 22-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Reword and reformat some of the "Multiarch" code in the toolchain setup.

There are fundamentally two different things that were getting conflated
here.

1) A bi-arch GCC toolchain install. This is not a full blown cross
compiler, but it supports targetting both 32-bit and 64-bit variants
of the same architecture using multilib OS installs and runtimes.

2) A "multiarch" Debian OS/runtime layout that lays out the libraries,
headers, etc as-if there were going to be a full blown cross compiler
even when in reality it is just a bi-arch GCC targeting two variants.
Also, these tend to use oddly "canonicalized" triples without the
vendor in them unlike the typical cross compiler runtime library
search that vanilla GCC cross compilers perform.

Now, when we mean the bi-arch nature of GCC accomplished with just
a suffix or tweak to the GCC paths, we say 'Biarch' or something
related. When we mean the Debian layout of includes and libraries, we
say multiarch or reference the multiarch triple.

In the process of reading and often renaming stuff in all these places,
also reformat with clang-format. No functionality change should be going
on here, this is just tidying up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184632 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ef37744ff649b939c2262c12218abb24485977d1 21-Jun-2013 Chandler Carruth <chandlerc@gmail.com> Update a comment to clarify that searching the target triple bin
directory for programs used by the driver is actually the standard
behavior we want to be compatible with GCC cross compilers -- it isn't
specific to SUSE or any other distro.

Also start fleshing out testing of the different cross compilation
patterns, both with a new very bare-bones tree of cross compilers and by
extending the multilib trees. Currently, we don't correctly model doing
a cross compile using the non-triple target of a bi-arch GCC install,
but I'll add support for that (and tests) next.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184499 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3a166e2b1091e6d5ad2e77a4fa2f74cbfe7cf13e 20-Jun-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add -fno-assume-sane-operator-new when building with MSan.

A workaroudn for PR16386. MSan's operator new aften has side-effects that are
miscompiled without this flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184410 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
e40bc4b791eeb38a2f43e5a099a1c06048dc8c15 20-Jun-2013 Richard Smith <richard-llvm@metafoo.co.uk> Fix typo in r184308.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184391 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2d8b279656ba0b8d634f89695c710c45107e5a06 19-Jun-2013 Renato Golin <renato.golin@linaro.org> Revert "Adds support for openSUSE ARM v5/v7 triples."

This reverts commit 312e51ca484976c2b1254952ff23d5162ca8edc2.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184324 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
50abf4bcaa64f7410c8f8681974bb9e959d4a079 19-Jun-2013 Renato Golin <renato.golin@linaro.org> Adds support for openSUSE ARM v5/v7 triples.

Now, with a comma.

Patch by İsmail Dönmez

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184323 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4cd90dfbf4e6ddfb34c4c14c2e06ac9fca6154d8 19-Jun-2013 Reid Kleckner <reid@kleckner.net> [Driver] Don't forward source file input args to gcc

gcc's inputs are already added by the InputInfoList passed to
Action::ConstructJob.

Fixes a regression from r183989. This was manifesting when targetting
mingw as an extra input argument to gcc when assembling. It presumably
affects other situations where clang calls gcc.

Prior to r183989, forwardToGCC() was returning false because the INPUT
option defined in OptParser.td had the DriverOption flag set on it.
LLVM's Option library does not set this flag for INPUT.

Reviewers: espindola

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184308 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3c1e4f266a90553459b2b9dfb8e63429eac89995 19-Jun-2013 James Molloy <james.molloy@arm.com> Revert r184302 on Renato's behalf - it broke the bots and he's asked me to revert as he's unavailable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184307 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
14595c2ea4999da6e79aa3b0b1981f63fda7c717 19-Jun-2013 Renato Golin <renato.golin@linaro.org> Adds support for openSUSE ARM v5/v7 triples.

Patch by İsmail Dönmez

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184302 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9ff463e4af8615a019dbdce406dc50b74460fe2a 19-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm::sys::fs::can_execute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184297 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
da1f9cb8ce0e89d2848390aef985bad9e32e1ddb 18-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use llvm::sys::fs::can_write.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184234 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.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
ools.cpp
3e8ac1b4d50a3b13bdda99f9d842b0127315ecf0 18-Jun-2013 Eric Christopher <echristo@gmail.com> Accept and ignore -fdebug-types-section for now. This will be used
later with dwarf4 type hashing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184152 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a372f40dac73b69936f6a713df0808c740bb326c 17-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Include PathV1.h only where it is used.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184090 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
oolChains.cpp
ools.cpp
indowsToolChain.cpp
dd0b3c4c72464af92e2c27dd5a67e29f91ba7b28 17-Jun-2013 Reid Kleckner <reid@kleckner.net> [Driver] Remove the using namespace directives from headers

This adds a bunch of llvm::opt name specifiers to all the uses of types
from that namespace.

Reviewers: espindola

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184079 91177308-0d34-0410-b5e6-96231b3b80d8
nputInfo.h
anitizerArgs.h
oolChains.h
ools.h
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
ction.cpp
rg.cpp
rgList.cpp
C1AsOptions.cpp
MakeLists.txt
ompilation.cpp
river.cpp
riverOptions.cpp
nputInfo.h
ob.cpp
ptTable.cpp
ption.cpp
anitizerArgs.h
oolChain.cpp
oolChains.cpp
ools.cpp
ools.h
indowsToolChain.cpp
162579a9441c7c8c308c56ac706799765ccbc4ee 14-Jun-2013 Tim Northover <tnorthover@apple.com> Remove implicit fallthrough from AArch64 to Mips in lib selection

Nothing useful to AArch64 will (should!) be found in any Mips-specific
directories.

Patch by Luke Zarko.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183956 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
57a3bbfa9a97f174b0c80b0309e32f4329c4ae1b 13-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the sys::ExecuteAndWait that takes StringRefs.

Also don't depend on Program.h including PathV1.h.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183935 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
4889a1fe91b0fd590e7beff16017086336064e6c 13-Jun-2013 Tim Northover <tnorthover@apple.com> Teach clang about the armv4/armv4t distinction

When choosing a default CPU, clang used to pick ARM7TDMI (which has Thumb) even
when the more restrictive armv4 triple was specified. This should fix that.

Patch by Jeroen Hofstee.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183905 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
1b034649379530c8870932449354b876f90e1644 13-Jun-2013 Sylvestre Ledru <sylvestre@debian.org> Add Ubuntu Saucy to the list of known Ubuntu releases
Thanks to Dmitry Shachnev for the patch
See bug #16317



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183899 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a603569515eea06e54e6e041b1c690d33086f375 12-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Use the global functions instead of the Program methods.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183861 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
2049840b0ffe8ee4bf39051cfa8ca08440c8f667 12-Jun-2013 Stephen Hines <srhines@google.com> Merge commit '1342a4ef62dd7b839c6f09348b246a4f00282f29' into merge_20130612
a265461d113ced2e6f0db684ed6f6cb0c66c0f24 11-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Try to fix the windows build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183783 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
61f0868f1920f80814e6d0195a1bc5b0f0bfc1b1 08-Jun-2013 Eric Christopher <echristo@gmail.com> When we're compiling with -pg make sure to link with gcrt1.o on linux. Be
sure to do this always, this matches the behavior for the gcc driver.

Fixes PR16251.

Based on a patch by Qiao Yang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183591 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c47b6f3c9efcd6b3039856a39665a3aef1ed334e 06-Jun-2013 Eric Christopher <echristo@gmail.com> If we're splitting the dwarf for fission and don't want to use the
integrated assembler then go ahead and still split the dwarf anyhow.

Add two tests, one to exercise existing behavior of not splitting
when we're just emitting assembly files and the other to test
that we split when we're not in integrated as mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183355 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9adba39460dfa5282b75dbd27db44ccfb4d1f511 05-Jun-2013 Rafael Espindola <rafael.espindola@gmail.com> Default to PIE and using stack protection on OpenBSD.

Patch by Matthew Dempsky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183295 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
bdaa13418851be5cc1ca3be88fbd82b15efecde7 27-May-2013 Peter Collingbourne <peter@pcc.me.uk> Driver: implement --dyld-prefix option.

This option is used to select a dynamic loader prefix to be used
at runtime. Currently this is implemented for the Linux toolchain.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182744 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
050309fdc6d8416b217f651141d5f391512b1041 27-May-2013 Sergey Matveev <earthdok@google.com> Add -fsanitize=leak to driver options.

If -fsanitize=leak is specified, link the program with the
LeakSanitizer runtime. Ignore this option when -fsanitize=address is specified,
because AddressSanitizer has this functionality built in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182729 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
3a8aff9493b6930c34f8efd5b6184fff3ce01cdb 24-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add -lrt to sanitizer link arguments.

Sanitizer runtime intercepts functions from librt. Not doing this will fail
if the librt dependency is not present at program startup (ex. comes from a
dlopen()ed library).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182645 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d5dcdb2658c5aa4568c61917a1620434b055c113 24-May-2013 Bill Wendling <isanbard@gmail.com> Constify the 'dump' method so that it can be called by a const object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182620 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
26afaf0b121f7c9aec93c3734ea9ebaa8820a7ee 20-May-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Extend default blacklist logic to MSan and TSan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182269 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
b69557ed6f6d5063705e60f771a612aa62ec6b22 18-May-2013 Chandler Carruth <chandlerc@gmail.com> Fix a logic bug in the handling of -fmath-errno in the driver. We would
imply -fno-math-errno if the user passed -fno-fast-math OR -ffast-math,
regardless of in which order and regardless of the tool chain default.

I've fixed this to follow the logic:

1) If the last dominating flag is -fno-math-errno, -ffast-math, or
-Ofast, then do not use math-errno.
2) If the last dominating flag is an explicit -fmath-errno, do use
math-errno.
3) Otherwise, use the toolchain default.

This, for example, allows the flag sequence
'-ffast-math ... -fno-fast-math' with no mention of '-fmath-errno' or
'-fno-math-errno' to preserve the toolchain default. Most notably, this
should prevent users trying to disable fast-math optimizations on Darwin
and BSD platforms from simultaneously enabling (pointless) -fmath-errno.

I've enhanced the tests (after more reorganization) to cover this and
other weird permutations of flags and targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182203 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6bdc4c65c0bfac1f42c3b57680ac4e45b622b266 11-May-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Add -mldc1-sdc1 / -mno-ldc1-sdc1 command line options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181660 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
b8409215523e5478b8b0aa9cdcd10038cf7651fe 06-May-2013 Ulrich Weigand <ulrich.weigand@de.ibm.com> Add SystemZ support

This patch then adds all the usual platform-specific pieces for SystemZ:
driver support, basic target info, register names and constraints,
ABI info and vararg support. It also adds new tests to verify pre-defined
macros and inline asm, and updates a test for the minimum alignment change.

This version of the patch incorporates feedback from reviews by
Eric Christopher and John McCall. Thanks to all reviewers!

Patch by Richard Sandiford.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
fd4aa4bec35161615fcee1db2c39ca1c25b1426e 06-May-2013 Tom Stellard <thomas.stellard@amd.com> R600: Update GPU variants in -mcpu option

We've added the RS880 variant in the LLVM backend to represent an R600
GPU with no vertex cache, so we need to update the GPU mappings for
-mcpu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181202 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
83eba02c2ea333015335e2f74c4d11c5315b655d 03-May-2013 Stephen Hines <srhines@google.com> Merge remote-tracking branch 'upstream/master' into merge-20130502
1c18759b45140c85e62ac6367fbee51f363e3c81 01-May-2013 Chad Rosier <mcrosier@apple.com> [driver] Allow multiple -arch options with -save-temps by adding the arch name
to the temporary files.
rdar://13218604


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180813 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ec2b1b9c7c3be4c3140a1c9631ef9279d0fd8ec9 30-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Always use / when computing mips specific paths.

We were getting paths with both / and \ in them. This should fix mips-cs-ld.c
on the windows bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180783 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9dbfc6135580357428966ff05427f654dba44cd3 30-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Pass -mips16, -mmicromips, -mdsp and -mdspr2 flags to the
assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180775 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
a7efaf99ac662af11890aae74d84da8d31ab2fe0 30-Apr-2013 Joerg Sonnenberger <joerg@bec.de> Add support for -stdlib=libc++ in the NetBSD toolchain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180766 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
99d2eb487f8d9fbb4e74d0b7154eff5b2232e10f 27-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> Exit early when $PWD isn't set. Remove unused unistd.h include.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180670 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6089adc7310e5e70ac42b5d942344cddb8a48f55 27-Apr-2013 Benjamin Kramer <benny.kra@googlemail.com> Use LLVM's preferred current_path API instead of calling getcwd(3) directly.

The existing code also failed to allocate a buffer for it so getcwd corrupted
the stack. sys::fs::current_path takes care of the memory management.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180669 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c993747da28138cadb40fd0b34587cf3a9be499 27-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Revert r180652 and 180658 and temporarily #define MAXPATHLEN to
make the gdb tests and the Windows bots happy.

The Path::GetCurrentDirectory API is not equivalent to ::getcwd(), so
r180652 causes a gdb tests to fail. On the other hand, <sys/param.h>
isn't defined on Windows systems, so that causes Windows builds to fail.
rdar://12237559

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180661 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1d22fa209d194c8ab676498b13ff5e25cb07d17d 27-Apr-2013 Chad Rosier <mcrosier@apple.com> Fix the dangling pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180658 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e1c4ac314f69b1590dd3046233b6530cc154ebb5 27-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Use the llvm equivalent of getcwd(). Hopefully, this makes the Windows
bots recover.
rdar://12237559

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180652 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b1c8122b43058fc0c049a9c6fc8aaef044005798 26-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Implement the -fdebug-compilation-dir in a way that is compatible with
gcc. No test case included as I'm having problems finding a test case where
the inode/dev don't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180628 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3142279baca34d4c9c9054e6848215740896b1bb 24-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Put -fvectorize under the -Ofast umbrella flag.
Part of rdar://13622687

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180206 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
0127b3f60b5bf7b8caed8426b8bd77c4a019a286 24-Apr-2013 Chad Rosier <mcrosier@apple.com> [driver] Add a hasFlag API that accepts a positive alias.
Part of rdar://13622687

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180203 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
c7e2a4e08a14ff04de41146c418b71cd577c0a0d 21-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Convert a GNU style Mips ABI name to the name accepted by LLVM
Mips backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179981 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
990b5e5be5e60e91cab2134d7f37a0ba70f727c2 21-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Do not add unnecessary Mips toolchain path to the list
of system include directories with extern "C" semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179979 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8e8e95c57c310bbc52cdc8d32df23c95afc77916 20-Apr-2013 Simon Atanasyan <simon@atanasyan.com> Supports Sourcery CodeBench Mips toolchain directories tree.

Sourcery CodeBench and modern FSF Mips toolchains require a bit more
complicated algorithm to calculate headers, libraries and sysroot paths
than implemented by Clang driver now. The main problem is that all these
paths depend on a set of command line arguments additionally to a target
triple value. For example, let $TC is a toolchain installation directory.
If we compile big-endian 32-bit mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2 folder and the toolchain's linker requires
--sysroot=$TC/mips-linux-gnu/libc argument. If we compile little-endian
32-bit soft-float mips code, crtbegin.o is in the
$TC/lib/gcc/mips-linux-gnu/4.7.2/soft-float/el folder and the toolchain's
linker requires --sysroot=$TC/mips-linux-gnu/libc/soft-float/el argument.

1. Calculate MultiarchSuffix using all necessary command line options and
use this MultiarchSuffix to detect crtbegin.o location in the
GCCInstallationDetector::ScanLibDirForGCCTriple() routine.
2. If a user does not provide --sysroot argument to the driver explicitly,
calculate new sysroot value based on command line options. Then use this
calculated sysroot path:
a. To populate a file search paths list in the Linux::Linux() constructor.
b. To find Mips toolchain specific include headers directories
in the Linux::AddClangSystemIncludeArgs() routine.
c. To provide -–sysroot argument for a linker.

Note:
- The FSF's tree slightly differs (folder names) and is not supported
yet.
- New addExternCSystemIncludeIfExits() routine is a temporary solution.
I plan to move path existence check to the addExternCSystemInclude()
routine by a separate commit.

The patch reviewed by Rafael Espindola.
http://llvm-reviews.chandlerc.com/D644

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179934 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
9753d462fabba1db75a977cb1f75ea66e9081120 17-Apr-2013 Nico Weber <nicolasweber@gmx.de> Add support for gcc's spelling of -fcolor-diagnostics.

See http://gcc.gnu.org/onlinedocs/gcc/Language-Independent-Options.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179728 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
3c6a9b052373f656268557904d229a8ad8b7686f 15-Apr-2013 Nadav Rotem <nrotem@apple.com> Add a new flag -vectorize-slp-aggressive to enable Hals BB vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179507 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
50ea96332b5dae54cc724f924b343084cb9ea834 15-Apr-2013 Nadav Rotem <nrotem@apple.com> Rename the slp-vectorizer clang/llvm flags. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179506 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
321ae79aae228aa069795e78449a95fa35e2abfd 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Support -mmicromips / -mno-micromips command line options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179489 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a8141614514634c7bd0ee4bc96e19fb3c10f72f2 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179488 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c06cba04d7ab12a46bbdc5191a794bd9579ddd3 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Follow-up to r179481. Reduce code duplication. Use
AddTargetFeature() routine to handle -msingle-float / -mdouble-float
options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d44d04f571c25ed258ece30bd2da5ca23d3a0b0d 14-Apr-2013 Rafael Espindola <rafael.espindola@gmail.com> Add driver support for fedora 18 on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179484 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2ed42b86da17b8fc54480bf34e1965e20eee89f5 14-Apr-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Remove "single" from the list of valid MIPS float ABI names. Add
two new options –msingle-float and –mdouble-float. These options can be
used simultaneously with float ABI selection options (-mfloat-abi,
-mhard-float, -msoft-float). They mark whether a floating-point
coprocessor supports double-precision operations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179481 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f7f74c6b77ac7b3231d63093692b85bb2ebd07ef 13-Apr-2013 Simon Atanasyan <simon@atanasyan.com> Remove duplicated comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179454 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8cfb720c857e66b7fb64bf3cb80fd82fcd0c0ac3 12-Apr-2013 John McCall <rjmccall@apple.com> Fix the driver logic for recent versions of DragonFly.

Patch by John Marino.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179334 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
f6f77bd900ccc847c6601a34457c8b5f3cb48219 11-Apr-2013 Bob Wilson <bob.wilson@apple.com> Add a new -mimplicit-float option for symmetry with -mno-implicit-float.

This new option is the default, but it is useful to have a flag to override
-mno-implicit-float by putting -mimplicit-float later on the command line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179309 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
29828082ff7319f3c2e95e7bcc3cf6cc71f0da30 11-Apr-2013 Jyotsna Verma <jverma@codeaurora.org> Hexagon: Remove -g option from the assembler command line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179299 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
708d72a33de05579ba5ca1c22eeea92d1e47a9ee 10-Apr-2013 Eric Christopher <echristo@gmail.com> For split dwarf we should also run the objcopy action if we're
just assembling a file and have passed the option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179218 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
db68e5a1f239d7d6d2348fef7c492ee99a2b8bbc 09-Apr-2013 Alexey Samsonov <samsonov@google.com> One more follow-up to r179082 - parse PIC/PIE arguments even on platfroms that force default PIC (like Darwin x86-64), otherwise specifying -fPIC will produce bogus unused argument warning

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179092 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4a1ea52e1d1a565aa2c5d70b082cad210203224a 09-Apr-2013 Alexey Samsonov <samsonov@google.com> Follow-up for r179082: more careful handling of -f(no-)sanitize-address-zero-base-shadow on Android

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179089 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
52ca70dc304c694923ac804630d88b1d95bfa941 09-Apr-2013 Peter Collingbourne <peter@pcc.me.uk> If the user requested a zero-base-shadow sanitizer, infer -pie and -fPIC when appropriate.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179082 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
oolChains.cpp
oolChains.h
ools.cpp
indowsToolChain.cpp
e449edc5bdace60f9d754c32abc5459bc7d94a14 05-Apr-2013 Jordan Rose <jordan_rose@apple.com> [analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).

As mentioned in the previous commit message, the use-after-free and
double-free warnings for 'delete' are worth enabling even while the
leak warnings still have false positives.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178891 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.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
ools.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
ools.cpp
d3e22dfb776971f140c1b891e35fbcb08bb6faf7 03-Apr-2013 Eric Christopher <echristo@gmail.com> From PR9121 gcc defaulted to omitting the frame pointer on linux,
however, it doesn't do that unless we're optimizing. Change
that and haul out to a helper function. Also make this a driver
test appropriate rather than an assembly test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178606 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3d11708c491a96198ebfee49079ae458ed90eaf8 02-Apr-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Moving cplusplus.NewDelete to alpha.* for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178529 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e25d2f6c5b164b6e2ce1f0cacd62cf3cf59f5c37 01-Apr-2013 Tom Stellard <thomas.stellard@amd.com> R600: Handle -mcpu option v3

v2:
- Add a test case

v3:
- Use the -### clang option in the tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178499 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
fe6b2713656c2d1bf559be357f0e0bf2d09bebd6 30-Mar-2013 Hal Finkel <hfinkel@anl.gov> Add support for gcc-compatible -mfprnd -mno-fprnd PPC options

gcc provides -mfprnd and -mno-fprnd for controlling the fprnd target
feature; support these options as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178414 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
073f5e87dc936c906dde5ae21ebed3c59ce3d8e2 29-Mar-2013 Jyotsna Verma <jverma@codeaurora.org> Hexagon: Set Hexagon tool-chain when configured as OSless target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178358 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
577bb0a2335295958b3b0f88bc9cdedf6551c17f 28-Mar-2013 Thomas Schwinge <thomas@schwinge.name> Rename clang::driver::tools::linuxtools to clang::driver::tools::gnutools.

This is about the GNU Binutils' assembler and linker, so reflect that in the
name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178272 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
d52b4a9924f45c45a965a569ad179db25bb1af00 28-Mar-2013 Thomas Schwinge <thomas@schwinge.name> Rename LinuxDistro to Distro.

The concept of such a software distribution is not tied to the Linux kernel;
for example Debian GNU/Linux, Debian GNU/Hurd, and Debian GNU/kFreeBSD all
share the same source packages and generally the same user-space configuration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178270 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
829d187e2100d2cfd85acefc2e867d12336e393f 28-Mar-2013 Hal Finkel <hfinkel@anl.gov> Add support for gcc-compatible -mpopcntd -mno-popcntd PPC options

gcc provides -mpopcntd and -mno-popcntd for controlling the popcntd target
feature; support these options as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178235 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
286f3e638fd842619f853127907398859367a464 28-Mar-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Handle pseudo-target flags '-EL' and '-EB' and properly adjust
toolchain flags for MIPS targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178232 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f4320ab08da5e4c927ef326c68d5081f5f2a2268 28-Mar-2013 Hal Finkel <hfinkel@anl.gov> Add support for gcc-compatible -mmfcrf -mno-mfcrf PPC options

gcc provides -mmfcrf and -mno-mfcrf for controlling what we call
the mfocrf target feature. Also, PPC is now making use of the
static function AddTargetFeature used by the Mips Driver code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178227 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
river.cpp
ools.cpp
ypes.cpp
c48d575f2e41bec767ccdea6591404c907f1bc91 27-Mar-2013 Chad Rosier <mcrosier@apple.com> [driver] Do not generate crash diagnostics if the compilation command failed
to execute as the crash will surely reoccur while generating the diagnostics.
rdar://13362359


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178089 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.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
ools.cpp
2de19edab6001d2c17720d02fe0760b9b452192a 25-Mar-2013 Anton Yartsev <anton.yartsev@gmail.com> [analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, double free, and use-after-free problems of memory managed by new/delete.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177849 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
29511875348c49c9c5a14bb086cd51e17feb01c9 24-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Reject -no-integrated-as on windows.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177840 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
indowsToolChain.cpp
4a792960940bf19acced0123eae08bd39b15138b 23-Mar-2013 Bob Wilson <bob.wilson@apple.com> Revert svn r176894 and r177658.

Changing -ccc-install-dir to affect cc1's resource-dir setting broke our
internal LNT tests. After discussing the situation with Jim, we've decided to
pursue an alternate approach. We really want the resource-dir to be located
relative to clang, even when using -ccc-install-dir, but we're going to
add a fallback setting for the libc++ headers if they don't exist alongside
the compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177815 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
76e6e1377ff837047fb8e03a199c7f286c53897b 23-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> If a .syms file is available alongside a sanitizer runtime, pass it to the
linker via --dynamic-list instead of using --export-dynamic. This reduces the
size of the dynamic symbol table, and thus of the binary (in some cases by up
to ~30%).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177783 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
892b6fb1ae818acc594ea54aaee084a4c48458ff 21-Mar-2013 Douglas Gregor <dgregor@apple.com> <rdar://problem/13477190> Give the Clang module cache directory some structure, so it's easier to find.

We now put the Clang module cache in
<system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day
there will be other caches under <system-temp-directory>/org.llvm.clang>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177671 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4c49f7b473b0158bb6e3534f70143132cc638ce8 21-Mar-2013 Benjamin Kramer <benny.kra@googlemail.com> Avoid warnings from compilers that think you can drop off the end of a fully covered switch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177656 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
3656c612efe4889da0174ffa6a621a2d59fc3ecb 21-Mar-2013 Alexander Potapenko <glider@google.com> [ASan] Let the users to invoke `clang -fsanitize=address` to link binaries targeting the iOS simulator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177633 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
61a574f6a306a91fe78c39757f70f88e62b6736f 21-Mar-2013 Richard Smith <richard-llvm@metafoo.co.uk> Split ubsan runtime into three pieces (clang part):
* libclang_rt-san-* is sanitizer_common, and is linked in only if no other
sanitizer runtime is present.
* libclang_rt-ubsan-* is the piece of the runtime which doesn't depend on
a C++ ABI library, and is always linked in.
* libclang_rt-ubsan_cxx-* is the piece of the runtime which depends on a
C++ ABI library, and is only linked in when linking a C++ binary.

This change also switches us to using -whole-archive for the ubsan runtime
(which is made possible by the above split), and switches us to only linking
the sanitizer runtime into the main binary and not into DSOs (which is made
possible by using -whole-archive).

The motivation for this is to only link a single copy of sanitizer_common
into any binary. This is becoming important now because we want to share
more state between multiple sanitizers in the same process (for instance,
we want a single shared output mutex).

The Darwin ubsan runtime is unchanged; because we use a DSO there, we don't
need this complexity.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177605 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3309229f77222970cce344eaa6908ad9320d2d82 20-Mar-2013 Hans Wennborg <hans@hanshq.net> Fix redundant comparison in gcc::Common::ConstructJob.

We were checking "Arch == llvm::Triple::x86_64 || Arch
== llvm::Triple::x86_64", but the rhs should actually check for
powerpc64.

Found while experimenting with a potential new Clang warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177496 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f48b93cb2054e83e43ca4391b8ec70be89fa2e30 20-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove the Tools DensMap from the toolchain.

Each toolchain has a set of tools, but they are all of known types. It can
have a linker, an assembler, a "clang" (compile, analyze, ...) a non-clang
compiler, etc.

Instead of keeping a map, just have member variable for each type of tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177479 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
ccc45d2e9336d3177268ed9e23e5f5fad5e8ff2b 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Go back to using the integrated assembler on windows ever when passed
-no-integrated-as. It is the only assembler we have there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177398 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
7d0d85f38854b085bfe5c1bd4870126359f578c6 19-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make -fsanitize=address always imply -fsanitize=init-order

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177391 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
c0a55d12caff98504eace18b553bb111160a8131 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Finish refactoring the tool selection logic.

The general pattern now is that Foobar::constructTool only creates tools
defined in the tools::foobar namespace and then delegates to the parent.

The remaining duplicated code is now in the tools themselves.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177368 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
15d68882f5fa4afae8333e75b2bfd5e2834c8aaf 19-Mar-2013 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2013_03_18

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: I05e70941163ec5a461eba43ef78f6738cd5a1e69
8a1115f382cd61f560b3429a04ddaa70d9409b71 19-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the logic for using the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177360 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
indowsToolChain.cpp
5b222059399ec9cccba7a393dc470adfb8a3db0f 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Centralize the recording of which tools have been constructed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177319 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
51be73daa9df0b9eab157318a9274ebe3e46c627 18-Mar-2013 Fariborz Jahanian <fjahanian@apple.com> Objective-C modern translator. Don't put line info
into the pre-preprocessed file to be passed to
modern translator when compiling in no debug mode.
// rdar://13138170


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177311 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f3260565f46491a0d99e41d47a13767218242ce5 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Use early returns when checking if we already constructed a tool and when
delegating to Generic_GCC::SelectTool (it already updates the tool map).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177305 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
indowsToolChain.cpp
26adbe42d1fecd135dea6739ec2801f02473218f 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177303 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
af370e6e051e505016637e23418354db625dc796 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Pass an ArgList to every toolchain constructor. Remove the useIntegratedAs
argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177301 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
indowsToolChain.cpp
7ce8d82c4182b8b98d4b5c44f5258b9e9b2c1350 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Inline ShouldUseIntegratedAssembler and move the documentation to
useIntegratedAs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177300 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5470cd27e47aea163daaa76dde36010753400663 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Refactor a bit of duplicated code to useIntegratedAs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177299 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
indowsToolChain.cpp
e5dce308870cd7d6b5156640af3724433bc1c575 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177293 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
d5320184367b681087e9ff74fc57ed2c5954c8ec 18-Mar-2013 Rafael Espindola <rafael.espindola@gmail.com> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177287 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
indowsToolChain.cpp
b234e7484b8b678977e5c6a6088dee323c72d3ab 18-Mar-2013 Anton Korobeynikov <asl@math.spbu.ru> Make sure to use same EABI version for external assembler as for integrated as.
Patch by Andrew Turner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177252 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b7e86be4412635d34b2bf161e1b8bbf00be055c9 15-Mar-2013 Sylvestre Ledru <sylvestre@debian.org> Take in account the triplet 'powerpc-linux-gnuspe' for PowerPC SPE. Done for the port of Debian on this arch. More information on: http://wiki.debian.org/PowerPCSPEPort Patch by Roland Stigge

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177161 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7ac415b489dd3b22b0335af60d874143c9fdf63a 14-Mar-2013 Alexey Samsonov <samsonov@google.com> [ASan] Make -fsanitize=address imply -fsanitize=init-order (if the latter is not explicitly disabled).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4c1adcc50df4f825150833ad36ef15a0dc1d8b1c 12-Mar-2013 Ted Kremenek <kremenek@apple.com> [driver] Only enable -fmodules-autolink if we are using the integrated assembler.

Fixes <rdar://problem/13289240>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176897 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
61d16c1f491f5ad6d4a254dcca8868acb5f150cc 12-Mar-2013 Jim Grosbach <grosbach@apple.com> Driver: -ccc-install-dir should affect cc1 -resource-dir

-ccc-install-dir is supposed to cause the compiler to behave as-if it
were installed in the indicated location. It almost does, but misses
anything that's relying on the resource directory (libc++ header search,
in particular). The resource dir is resolved too early, before command
line args are handled.

The fix is simply to move handling of the resource dir until after we
know if a -ccc-install-dir is present.

rdar://13402696

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176894 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c06fcdfacc33ad4f8920bbdf43a0e45bc5e8ac4b 12-Mar-2013 Ted Kremenek <kremenek@apple.com> Revert "Disallow using -fmodules with -no-integrated-as."

Per comment from Benjamin Kramer, this isn't portable (yet). I'll come up
with a better fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176876 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ebf0f43f07e2fdc0e35554afb38f41c8be314b02 11-Mar-2013 Ted Kremenek <kremenek@apple.com> Disallow using -fmodules with -no-integrated-as.

Modules enables features such as auto-linking, and we simply do not want to
support a matrix of subtly enabled/disabled features depending on whether or
not a user is using the integrated assembler.

It isn't clear if this is the best place to do this check. For one thing,
these kind of errors are not caught by the serialized diagnostics.

Fixes <rdar://problem/13289240>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176826 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b9aa6739700d10e99da64cfa9b58ba7ca1c248e2 07-Mar-2013 Matthew Curtis <mcurtis@codeaurora.org> Minor refactor of how we get compilation phases.

There is now a single function to get the list of phases for a given
output Type.

No functionality change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176628 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.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
ools.cpp
f2e7c35ade3d28ef1c5ad91f757a7993b0006bbe 06-Mar-2013 Dmitri Gribenko <gribozavr@gmail.com> Driver: add support for new style multiarch in Ubuntu 13.04

Patch by Sanne Wouda.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176557 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
450b86c0c9ff8307f5145ced621914600196c500 06-Mar-2013 Stephen Hines <srhines@google.com> Merge commit 'b58f810669d9c17bcc025b7560de01d162856f34' into merge_20130226

Conflicts:
include/clang/Basic/LangOptions.def
lib/Sema/SemaDeclAttr.cpp

Change-Id: Ia10b4d3b2c949a72d328cb58b113f90237d4a5d5
2503ebd2cf9b4d28319551debaacff8b38765698 04-Mar-2013 Bob Wilson <bob.wilson@apple.com> Add ARM v6m, v7m, and v7em architectures for Cortex-M series processors.

<rdar://problem/11314476>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176458 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
fc55345144f636f7687fd37649f0302914981fff 04-Mar-2013 Bob Wilson <bob.wilson@apple.com> Tidy up lists of Cortex-A series processors, adding entries for A7.

Also fix a missing entry for cortex-r5 in one copy of getLLVMArchSuffixForARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176457 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
532f5a9d64212ae9dbaa19f25b223ecb4ed680ba 04-Mar-2013 Bob Wilson <bob.wilson@apple.com> Fix confused use of llvm::StringSwitch for armv7r architecture.

svn 170909 added support for cortex-r5 but in this case it was done
incorrectly. The last argument to StringSwitch.Cases() is the replacement
value, so by adding "cortex-r5" it changed the default cpu for armv7r to
cortex-r5 instead of cortex-r4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176456 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
68f94dbbd20cf41af733f2036c8688894489c3fd 04-Mar-2013 Chandler Carruth <chandlerc@gmail.com> Check for warnings in a bunch of the linker invocations, and add one
with both -static-libgcc and -static on the commandline.

Fix a warning in the latter case due to a backwards short circuiting ||
operator in the driver. No real functionality changed here, just allows
the driver to properly consume -static-libgcc when -static is also
specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176429 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5b9f5cc7c4310aec110f315df6fc6d6366b24b08 03-Mar-2013 David Chisnall <csdavec@swan.ac.uk> Default to enabling default-synthesized ivars on all platforms

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176419 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
16cda861c5587d7130a216466a29a808673c1656 28-Feb-2013 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix global overflow in types::lookupTypeForTypeSpecifier.

memcpy() is allowed to read entire contents of both memory areas.

Found with AddressSanitizer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176237 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
4c4df4520df20ec17d84aa2261f098ec278e1dab 27-Feb-2013 Chad Rosier <mcrosier@apple.com> [driver] The failure of any phase (e.g., preprocess, compile, assemble) for a
single translation unit should prevent later phases from executing. Otherwise,
this generates lots of noise in build systems. This a fallout from r173825.
Patch by Matthew Curtis <mcurtis@codeaurora.org>.
rdar://13298009

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176198 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
e9616a4972a4c2fdc28128c057f21d7a79516c86 27-Feb-2013 Simon Atanasyan <simon@atanasyan.com> [Mips] Add two new aliases for MIPS ABI names 32 (means o32 abi) and 64
(means n64 abi) to improve compatibility with GNU tools.
Patch by Jia Liu <proljc@gmail.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176187 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8614304c0d728d43ef16691708281273101b00af 27-Feb-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] Change driver behavior when linking with -fsanitize=thread and -fsanitize=memory. TSan/MSan also provide their versions of new/delete and should use the same strategy as ASan. Share the code that sets linker flags for all sanitizers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176178 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bcf73c225324ecc227a88b35598ca809fcd1d5c8 26-Feb-2013 Chad Rosier <mcrosier@apple.com> No need to initialize these variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176128 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a0a628f839cf50844cc0f226bd9cb72485f98f91 23-Feb-2013 Richard Smith <richard-llvm@metafoo.co.uk> ubsan: Emit bounds checks for array indexing, vector indexing, and (in really simple cases) pointer arithmetic. This augments the existing bounds checking with language-level array bounds information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175949 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
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
ools.cpp
efc5b6713e51726ced594bc566d3291ffbf22ae2 22-Feb-2013 Benjamin Kramer <benny.kra@googlemail.com> Driver: Pass down the -march setting down to -cc1as on x86 too.

The assembler historically didn't make use of any target features, but this has
changed when support for old CPUs that don't support long nops was added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175919 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
80190399f5a062db72127869978699af65951b73 22-Feb-2013 Eric Christopher <echristo@gmail.com> Split out the command handling for split debug info, we're going
to want to propagate some information through the module into
the back end and so need to pass it through to codegen.

Also make the methods file static so we can use them in other places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175916 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
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
ools.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
ools.cpp
5704d34444ecd7e1baa90026fb36c47207e0a3b7 22-Feb-2013 Eric Christopher <echristo@gmail.com> Make sure we only use the output file as a base for debug splitting
if we're compiling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175851 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
025b3d4f528ce54242f414057cc45a65e39098db 22-Feb-2013 Eric Christopher <echristo@gmail.com> Make logic smaller.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175839 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f870e12f2324f48248793035ab0edb35d66e2299 21-Feb-2013 Eric Christopher <echristo@gmail.com> Don't pass -split-dwarf= to the backend unless we're on linux for
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175814 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
59320e770f90a59c74f2be10f198e3c390195628 21-Feb-2013 Eric Christopher <echristo@gmail.com> Remove the SplitDebug action and replace with a set of commands
in the compilation setup. Note that this doesn't currently
work for -no-integrated-as.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175813 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
oolChains.cpp
ools.cpp
ools.h
indowsToolChain.cpp
649aa6adc4d8650033508d38d3b442d355d90824 21-Feb-2013 Chad Rosier <mcrosier@apple.com> [driver] Add a dump method for ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175777 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
75f6a66f9a946a6839f70cf4856ceb1fb94aa6ad 21-Feb-2013 Nick Lewycky <nicholas@mxc.ca> Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175706 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
24697b0a7297f530822dac42e36feb77738c1885 19-Feb-2013 Alexey Samsonov <samsonov@google.com> [Sanitizer] If -fsanitize-blacklist= option is not explicitly specified, make Clang look for the default sanitizer-specific blacklist in the resource directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175505 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
98654c938da09e045ff3c18324d26d52d36ee155 19-Feb-2013 Eric Christopher <echristo@gmail.com> More grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175492 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
f110a9c6876e36ef77a54b191ea4ecf3443ac620 18-Feb-2013 Eric Christopher <echristo@gmail.com> Fix up grammar a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175418 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6c7db8967c383d859eab6d541db816adbeb837a9 18-Feb-2013 Eric Christopher <echristo@gmail.com> Unify some "kernel or kext" conditionals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175414 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3fcdea71152ed2e3efedbf8e3b3c1309dae67ab6 18-Feb-2013 Eric Christopher <echristo@gmail.com> Add a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175412 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cfc01e45dd2ea51017aea299431c119dbcd94e53 18-Feb-2013 Eric Christopher <echristo@gmail.com> Clean up comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175411 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d4440c230d6d70becbd00da168591178720452f2 18-Feb-2013 Eric Christopher <echristo@gmail.com> Grammar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175410 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0798b69ee40219ed276bd8a65efd46bedc78ac42 18-Feb-2013 Eric Christopher <echristo@gmail.com> Unify some code. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175409 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f0c5456d7d6a9f74281011297d86cb3b1fa53cc1 10-Feb-2013 Bob Wilson <bob.wilson@apple.com> Use -mno-implicit-float by default for kernel/kext code. <rdar://13177960>

Apple's kernel engineers have been expecting this behavior even though
we've never implemented it before, as far as I can tell. In recent months,
clang has gotten better at using vector instructions to optimize memcpy-like
operations, and that has exposed problems when vector/floating-point
instructions are used in kexts that don't support that. This behavior also
matches what Apple's GCC did for PowerPC targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174838 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
48559ba03a1bc47c8d7e6ad77615c48361132178 10-Feb-2013 Bob Wilson <bob.wilson@apple.com> Delete an extra blank line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174837 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
7a9e91a1a0b94ea8a34daad41604339b5e0a7101 10-Feb-2013 Bob Wilson <bob.wilson@apple.com> Recognize -mno-implicit-float option for x86 as well as ARM. <rdar://13180731>

For x86 targets, we've been using the -msoft-float option to control passing
the no-implicit-float option to cc1. Since the -mno-implicit-float option is
now accepted by the driver, this just makes it work for x86 the same as it
does for ARM targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174836 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3f6f51e28231f65de9c2dd150a2d757b2162cfa3 08-Feb-2013 Jordan Rose <jordan_rose@apple.com> Excise <cctype> from Clang (except clang-tblgen) in favor of CharInfo.h.

Nearly all of these changes are one-to-one replacements; the few that
aren't have to do with custom identifier validation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174768 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
250172a851a886c0763b5fd61c20bf21791c21e9 07-Feb-2013 Douglas Gregor <dgregor@apple.com> Form the default -fmodules-cache-path= properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174674 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ools.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
ools.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
ools.cpp
40a94e299eadc5b80bd1dabf948d25d7c8cc4aa5 06-Feb-2013 Renato Golin <renato.golin@linaro.org> Adding armv7l default to cortex-a8

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174466 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
c706c8e440abf61910c042380e19c67932998395 05-Feb-2013 Eric Christopher <echristo@gmail.com> Driver and option support for -gsplit-dwarf. This is a part of
the DWARF5 split dwarf proposal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174349 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
oolChains.cpp
ools.cpp
ools.h
indowsToolChain.cpp
4f4e2af2643c1914c2e49ac6372f7c2c38616432 05-Feb-2013 Eric Christopher <echristo@gmail.com> Spaces instead of tabs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174348 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2821e180094459cbdef37e7d7c12bb406d5b82ba 01-Feb-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Add some missing PPC cpus

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174215 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3c6aaeb26202b41173dd9ea982833fe975147d80 01-Feb-2013 Hal Finkel <hfinkel@anl.gov> Add -mqpx and -mno-qpx feature flags to toggle use of the PPC QPX vector instruction set

I've renamed the altivec test to ppc-features (because now there is more than one feature to test).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174204 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
75dbc717c21a662b7836ed34cc4e7da7b8fa33c0 01-Feb-2013 Chad Rosier <mcrosier@apple.com> [driver] Don't try to generate diagnostic information for dsymutil crashes.
Part of rdar://13134273


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174203 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.h
5ccd3d0214b9d765a1bb41872da27d3c5530ab2b 01-Feb-2013 Hal Finkel <hfinkel@anl.gov> Add PPC A2Q core and BG/Q preprocessor definitions

The a2q core is the variant of the a2 core used on the BG/Q supercomputers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174151 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
199402b9e081dedc28e19ab6e727470b34f2f64d 01-Feb-2013 Bill Schmidt <wschmidt@linux.vnet.ibm.com> Enable -fno-altivec, -mno-altivec for PowerPC.

Introduces these negation forms explicitly and uses them to control a new
"altivec" target feature for PowerPC. This allows avoiding generating
Altivec instructions on processors that support Altivec.

The new test case verifies that the Altivec "lvx" instruction is not
used when -fno-altivec is present on the command line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174140 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c264e16a42b3f6c36521857a29ea0949d9781c22 31-Jan-2013 Tim Northover <Tim.Northover@arm.com> Add support for AArch64 target.

In cooperation with the LLVM patch, this should implement all scalar front-end
parts of the C and C++ ABIs for AArch64.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174055 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
8425a5413b437a0b6ac04c475e7cf54cc9977880 30-Jan-2013 Chad Rosier <mcrosier@apple.com> [driver] Clear the FailureResultFiles when initializing clang diagnostics. Also,
minor cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173852 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.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
anitizerArgs.h
ools.cpp
a16355c31878403443f99077cc8df8318457faf5 29-Jan-2013 Chad Rosier <mcrosier@apple.com> [driver] Refactor the driver so that a failing commands doesn't prevent
subsequent commands from being executed.

The diagnostics generation isn't designed for this use case, so add a note to
fix this in the very near future. For now, just generated the diagnostics for
the first failing command.
Part of rdar://12984531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173825 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
a522987e420eade60baba7d67a38e5c9500d2582 28-Jan-2013 Eric Christopher <echristo@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173700 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3e335c118140c40b264a26b13e44af368514cb87 28-Jan-2013 Alexey Samsonov <samsonov@google.com> Print warning instead of error if optional ASan features are enabled w/o specifying -fsanitize=address

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173670 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
9d718635fa805674aaba5d938f3dc6b35b8632ba 24-Jan-2013 Chad Rosier <mcrosier@apple.com> [driver] Associate a JobAction with each result file. This enables the driver
to delete result files for only those commands that fail.
Part of rdar://12984531

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173361 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
ools.cpp
ools.h
6ea3a2a6fafde4732ca4dd0426141772a5904271 23-Jan-2013 Daniel Dunbar <daniel@zuster.org> [Driver] Don't remove non-regular files that were outputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173215 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.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
ools.cpp
454028e1beed117f98d7e5157ba47e784e521f72 22-Jan-2013 Alexander Potapenko <glider@google.com> [ASan] Link with the dynamic runtime on OS X
This patch changes the behavior of the -fsanitize=address flag, making it use the dynamic runtime library (libclang_rt.asan_osx_dynamic.dylib) instead of the static one. It also drops the CoreFoundation dependency, since the dynamic runtime doesn't need it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173135 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
15bb58edc9d053aa49c28167deb41ff0409ddabc 21-Jan-2013 Stephen Hines <srhines@google.com> Merge commit 'd130fd2e141f1fef412c2d58e7385370801bd718' into merge-llvm

Conflicts:
lib/Basic/Targets.cpp

Change-Id: I90a669a33ffe4de8b32c8459016fd0b2a55da0ad
2cb3d300ecd36558bf2201debe28808d12a97be2 21-Jan-2013 Alexey Samsonov <samsonov@google.com> Port r172856: 'Include ubsan runtime even when building a shared library. We don't require executable to be linked with UBSan.' to Mac

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173014 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.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
anitizerArgs.h
ools.cpp
79188aec47679850214786ae7587d410746b0619 18-Jan-2013 Richard Smith <richard-llvm@metafoo.co.uk> Include ubsan runtime even when building a shared library. We don't require the executable to be linked with UBSan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0234179282d59e6dfccc8b2da72a9a71bf5b6ac3 17-Jan-2013 Kevin Enderby <enderby@apple.com> We want the dwarf AT_producer for assembly source files to match clang's
AT_producer. Which includes clang's version information so we can tell
which version of the compiler was used.

This is second of the two steps to allow us to do this. The first was a
change to llvm-mc with revision 172630 to provide a method to set the
AT_producer string. This second step has the clang driver passing the value
of getClangFullVersion() via the new flag -dwarf-debug-producer when invoking
the integrated assembler on assembly source files. Then using the new
setDwarfDebugProducer() method to set the AT_producer string.

rdar://12888242


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172758 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
17d481fb97b304a58e45a136e3f3e2a2a22b76c8 17-Jan-2013 Peter Collingbourne <peter@pcc.me.uk> Do not pass -pie flag to linker if -shared specified. This matches
the gcc driver and makes it possible to add -pie to $CC or similar and
have it apply in the right places.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172753 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
df96e022e95b8540c51e1bdaed03f66d851c6f93 17-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Add initial rough support for synthesizing linker options when passed
-fopenmp in the link step on Linux. There is probably more tweaking that
will need to take place to get good support for linking the relevant
libraries on all Linux distributions and/or on other platforms, but this
get's the ball moving and allows Clang to build programs which contain
OpenMP pragmas that can be safely ignored by a compiler that doesn't
implement them, and yet makes direct calls into the OpenMP runtime.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172715 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a40548c36d91189506cb61fc66ab915fb91906e3 16-Jan-2013 Alexey Samsonov <samsonov@google.com> Fix uninitialized bool flag access in SanitizerArgs parser

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172605 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
321425445f4ce31ccf477bea3240d05e0b1625b2 15-Jan-2013 Daniel Dunbar <daniel@zuster.org> [driver/Darwin] Adjust SDKROOT handling code to not generate "-isysroot /".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172548 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
700d4e44793697288dd827c272ad363945f590a9 13-Jan-2013 Chandler Carruth <chandlerc@gmail.com> Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
flag information down from the Clang driver into the Gold linker plugin
for LTO. This allows specifying -march on the linker commandline and
should hopefully have it pass all the way through to the LTO optimizer.

Fixes PR14697.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172354 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
anitizerArgs.h
oolChains.cpp
ca1ad5018da214b9ff584f57288258424eb76089 10-Jan-2013 Will Dietz <wdietz2@illinois.edu> ToolChains: Minor touchup to use correct type, avoid truncation.

Truncation happens regularly when find_first_not_of returns npos,
strings long enough to trigger bug here are implausible.

No functionality change intended (ignoring absurd string lengths).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172127 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e1d792f0ee02b5beb4b8e94506b3a0c353df43dd 10-Jan-2013 Simon Atanasyan <satanasyan@mips.com> [Mips] Pass a combination of +soft-float and -mips16-hard-float flags to
the backend if hard float ABI is selected under -mips16 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172062 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b17185204db26c59e329f6f0af96e7265fd084ba 06-Jan-2013 Sylvestre Ledru <sylvestre@debian.org> Prepare for the upcoming version of Debian (jessie)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171655 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6cc2a68c1ecb20054819a0b154ccfb7ff7498595 31-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Silence some warnings and allow passing down some feature flags to the linker.
Patch by Brad Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171329 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
5ba0c8e4077902f53e5f3e8271e470a1d8c1c074 29-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Fix a typo that caused a few standard library implementations of sort to
get the wrong answer. Wasn't caught by my implementation sadly...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171222 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f1757659dd59a0e07e8607fca8d3f052e04d0aec 29-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Try to re-structure the GCCVersion comparison routine to make it easier
to read and tell that it is a SWO -- we now descend through the
components and return a result at the first inequal component.

Also comment it a bit better and make it a total ordering by sorting on
the text of the suffix if necessary.

None of this should really be a visible change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@171219 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
anitizerArgs.h
ools.cpp
ab13751d76be4473e9317d3885cb351b79f18492 21-Dec-2012 Quentin Colombet <qcolombet@apple.com> Add ARM cortex-r5 subtarget as available mcpu

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170909 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
bb6a7e047aefd9ba4bab3ce1dcbb7ce2e2895b07 21-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Update comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170890 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a367a0236211dd2c81a363c4b47b40e0ac6a8797 20-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix Generic_GCC::GCCVersion::operator<

Without this patch comparing two equal versions without patch numbers (4.7 for
example) will result in A < B and B < A.

Patch by Simon Atanasyan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170705 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5b9268f26ac53a74d2c504279fe577d988d5615d 20-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Fix code that attempted to produce a diagnostic with one DiagnosticEngine, then
produce a note for that diagnostic either with a different DiagnosticEngine or
after calling DiagnosticEngine::Reset(). That didn't make any sense, and did the
wrong thing if the original diagnostic was suppressed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170636 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d7dfd98f07f6af9416b342825217022f2e970a66 20-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver] Have -isysroot warn on nonexistent paths.
rdar://12282267

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170611 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0f6ef2879083d3c556b9b74d2df7a07dc0b227d5 19-Dec-2012 Nadav Rotem <nrotem@apple.com> Enable the loop vectorizer in clang via -fvectorize

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170472 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
27e2b983beb8b5a29869639637327725623069a8 18-Dec-2012 Eric Christopher <echristo@gmail.com> Add support for passing the main file name down to the assembler
for location information.

Part of PR14624

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170391 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
d566df67bed6381f6e859bbd21fd43ff89277cc0 17-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Fix PR14625 by teaching the driver to detect PWD for assembly files.

This also requires adding support to -cc1as for passing the detecting
PWD down through LLVM's debug info (which in turn required the LLVM
change in r170371).

The test case is weak (we only test the driver behavior) because there
is currently to infrastructure for running cc1as in the test suite. So
those four lines are untested (much like all other lines in that file),
but we have a test for the same pattern using llvm-mc in the LLVM
repository.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170373 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
de39d1752f1559060237f158e47af6527d5e4abe 13-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Add support for current Ubuntu Quantal and the upcoming Raring.
Patch by Martin Nowack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170147 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
27fa2364b05ab26138c2ecf0eac1937b7fc6c037 13-Dec-2012 Rafael Espindola <rafael.espindola@gmail.com> Initial support for FreeBSD on ARM.
Patch by Andrew Turner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170096 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
b2c0887457ef509c1a93bcddf9ad8f5e87d9945e 12-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver] Don't warn about an unused -flto option.
rdar://12851905

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170010 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
04ee66e1fee44e72ee57845c1405a7f498a9daf7 12-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/lib/Driver/Driver.cpp: Split COMPILER_PATH according to llvm::sys::PathSeparator, that is ';' in Win32 hosts.

Thanks to Bogon Kim!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169964 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
443c999c967d555f6942834b0924c60226b3e6f2 11-Dec-2012 Hal Finkel <hfinkel@anl.gov> Add -fslp-vectorize to enable bb-vectorize

Add -fslp-vectorize (with -ftree-slp-vectorize as an alias for gcc compatibility)
to provide a way to enable the basic-block vectorization pass. This uses the same
acronym as gcc, superword-level parallelism (SLP), also common in the literature,
to refer to basic-block vectorization.

Nadav suggested this as a follow-up to the adding of -fvectorize.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169909 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c04d0934dfc78038ec1c073d9215750bd6a39c76 11-Dec-2012 Chad Rosier <mcrosier@apple.com> [driver] Add the -fvectorize flag to enable the loop vectorization passes.
rdar://12839978

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169885 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d56f40341374ba5970283a15f27fb1999965967a 10-Dec-2012 Bill Wendling <isanbard@gmail.com> Add support to Darwin for the -export_dynamic' flag to the linker.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169775 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3d8d4223813506df2f1b71cbb2f4a175faf85e6a 07-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: forward appropriate args to assembler



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169611 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2a907f8735cee8ae145ffded6d8dfb1e8cf29b28 07-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Driver/ToolChains.cpp: Add the name CentOS5 32bit gcc44 (aka i386-redhat-linux6E).

Thanks to Bruce Stephens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169610 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1dbaef5fe123c588ed6c995dd0a0b79c285433ae 07-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: add cc1 defaults for hexagon-gcc
compatibility



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169599 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c57d158c2900185d7828a92ca8db7b877ef1a621 07-Dec-2012 Logan Chien <tzuhsiang.chien@gmail.com> Revert r169557. It seems that the test is too restricted
and will break the build on buildbot.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169562 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
cd15652e632dea25ba5157dcef13963b7b0b79ea 06-Dec-2012 Logan Chien <tzuhsiang.chien@gmail.com> Add i686-linux-android for gcc toolchain detection.

* Look for i686-linux-android under <sysroot>/lib/gcc.

* This patch also slightly enhance the test suite for
Android GCC toolchain detection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169557 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
33c95f1178999ea06837769f90be8d7b8d57bb4d 06-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: Add/improve support for small data
threshold, pic, pie



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169517 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5fdf350e39c6e260602dbbd709101a9bb55e75f1 06-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: Reimplement Link::ConstructJob to call
linker directly

Rather than calling gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169512 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
6781415fa6d98aed548e84a70f1cd3ec31bba7d3 06-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: Move getHexagonTargetCPU from Tools.cpp to
ToolChains.cpp

This is in anticipation of forthcoming library path changes.

Also ...
- Fixes some inconsistencies in how the arch is passed to tools.
- Add test cases for various forms of arch flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169505 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
b3489a0d355128f1cc96fdde2a6b11a8361d6740 06-Dec-2012 Matthew Curtis <mcurtis@codeaurora.org> Hexagon TC: Update toolchain to add appropriate include
paths

- Inherit from Linux rather than ToolChain
- Override AddClangSystemIncludeArgs and AddClangCXXStdlibIncludeArgs
to properly set include paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169495 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
ools.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
ools.cpp
99469f732efbd6600dfd0a70e0a36116a717dd06 05-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Reuse an existing diagnostic for tsan/msan needing -pie error.
Add a diagnosting for -fsanitize=memory conflicting with other sanitizers.
Extend tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169380 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
88a8fa366e1a76507ae2212f9c3f110df865c3a5 05-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> Driver.cpp: Restore clang/Config/config.h to be included at last not to prevent llvm-config.h.

Or "llvm/Support/system_error.h" could not be compiled on mingw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169354 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1d1539875bc0a00935ffb41e27a8fd327054c006 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Add -whole-archive around the ASan runtime archive in the link command.

This ensures that even though it comes first, we pick up its .o files.
Note that if we can use this (or something similar / equivalent) on
other platforms, we could potentially remove
ReplaceOperatorsNewAndDelete from the ASan runtimes.

We should probably do something similar for TSan and MSan as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169328 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
45b27380a24dcd6a39faa888b5d31192801c43f4 04-Dec-2012 Matt Beaumont-Gay <matthewbg@google.com> Currently, with -fsanitize=address, the driver appends libclang_rt.asan.a to
the link command. This all works fine when the driver is also responsible for
adding -lstdc++ to the link command. But, if -lstdc++ (or libstdc++.a, etc) is
passed explicitly to the driver, the ASan runtime will appear in the link
command after the standard library, leading to multiple-definition errors for
the global 'operator new' and 'operator delete'. Fix this in a painfully
simple way, by inserting libclang_rt.asan.a at the start of the link command
instead of the end.

If we need to do something more clever, we can walk the link command looking
for something that resembles libstdc++ and insert libclang_rt.asan.a as late
as possible, but the simple solution works for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169310 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5542635a0fcfcd4b96eecf6f08e3648bd5bf739c 04-Dec-2012 NAKAMURA Takumi <geek4civic@gmail.com> ToolChains.cpp: Fixup r169260, clang/Config/config.h needs to be listed *last*, or llvm/Config/llvm-config.h could not be read in header files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169268 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
00a3cccb8cbd9accddfa0e77e85939e263d6a10d 04-Dec-2012 Chandler Carruth <chandlerc@gmail.com> Autotools has the same include guard for both Clang and LLVM's config.h.
Shuffling order causes the wrong one to win.

CMake didn't exhibit this problem because Clang's has *no* guards.

I'll fix this properly tomorrow when Eric and I can check both build
systems and get them to DTRT, but for now unbreak some bots by hoisting
this header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169260 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ction.cpp
rgList.cpp
C1AsOptions.cpp
ompilation.cpp
river.cpp
nputInfo.h
ob.cpp
ptTable.cpp
ption.cpp
hases.cpp
anitizerArgs.h
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ypes.cpp
indowsToolChain.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
anitizerArgs.h
ools.cpp
09ccf39c13cfca102deea2986f45cb908bc232fd 03-Dec-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Add -fsanitize=memory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169124 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
bda07ace55e40bd1a620051156fa9b13ad3936aa 01-Dec-2012 Simon Atanasyan <satanasyan@mips.com> [MIPS] Add -mxgot/-mno-xgot command line options
to enable/disable support of GOT larger than 64k.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169098 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
056503786410c0e72b1389918719a37e9342817b 01-Dec-2012 Richard Smith <richard-llvm@metafoo.co.uk> Remove restriction on combining ubsan with asan or tsan. This has worked for a while.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169066 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
74632aab3ad87c89823421d8239a47b6697b6e79 30-Nov-2012 Quentin Colombet <qcolombet@apple.com> Add ARM cortex-a5 subtarget

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168958 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
398b8e86ab421592f9e72b92c4558ea865b26e86 30-Nov-2012 Quentin Colombet <qcolombet@apple.com> Revert commit revision r168953, to change the commit message, which was empty

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168956 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b3233f5ed4411af458dc66fa566df2ba7510d26f 29-Nov-2012 Quentin Colombet <qcolombet@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168953 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4d1a6e41e1eaeaf5a4672c802519f15c8fb91e91 29-Nov-2012 Alexey Samsonov <samsonov@google.com> This patch exposes to Clang users three more sanitizers are experimental features of ASan:
1) init-order sanitizer: initialization-order checker.
Status: usable, but may produce false positives w/o proper blacklisting.
2) use-after-return sanitizer
Status: implemented, but heavily understed.
Should be optional, as it significanlty slows program down.
3) use-after-scope sanitizer
Status: in progress.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168950 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
6716d9443d5d13f4f49a39b9d02f2e256cb83a97 29-Nov-2012 Eric Christopher <echristo@gmail.com> Make sure that we put the rest of the sanitizer libraries on the link line
before libstdc++ like we do with ubsan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168918 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
586a061ad96f750e2a5aefcf3e2ce9e5474cdd61 29-Nov-2012 Chad Rosier <mcrosier@apple.com> [driver] -mkernel implies -mstrict-align; don't add the redundant option.
rdar://12771737

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168841 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3325b1617fce0c8c399b3010f8a65420e623d6f7 28-Nov-2012 Alexey Samsonov <samsonov@google.com> Refactor -fsanitize, -f*-sanitizer arguments parsing. Provide a more careful diagnostic for invalid sets of sanitizers

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168794 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
ools.cpp
f8fc6273ed33386f5081f5cd5d30abd339eec030 27-Nov-2012 Chad Rosier <mcrosier@apple.com> Remove an extra semicolon.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168707 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
17c874a944090a74aa890d7b5ef361be6e4a0184 27-Nov-2012 Rafael Espindola <rafael.espindola@gmail.com> Remove some dead code. CLANG_IS_PRODUCTION is now just a build flag and
is not used in any #ifdef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168703 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b85403658a77e9c19c391c8f02bc7767544a25d9 27-Nov-2012 Will Dietz <wdietz2@illinois.edu> Add -fsanitize=integer for reporting suspicious integer behaviors.

Introduces new sanitizer "unsigned-integer-overflow".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168701 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
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
anitizerArgs.h
ools.cpp
66b8a6671bb5df540dd7200a5286f7ed7a72c1cc 23-Nov-2012 Bob Wilson <bob.wilson@apple.com> Reapply a subset of r167567 to clean up Darwin-specific code for invoking gcc.

Unlike my previous attempt at this, this patch leaves intact the check for
whether clang can handle the input file type, and for non-Darwin toolchains it
will invoke gcc for things it cannot handle. For Darwin toolchains, the
behavior reported in pr14338 still occurs with this patch, but that is a
definite improvement from what happens currently, where it just crashes with
an assertion failure.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168505 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
a6b2581f9595fb803fe7e2ef1d9f25e75b26d2fb 22-Nov-2012 Chandler Carruth <chandlerc@gmail.com> Fix the '-fuse-init-array' option to actually be an option.

Previously, this flag to CC1 was never exposed at the clang driver
layer, and if you happened to enable it (by being on Android or GCC 4.7
platform), you couldn't *disable* it, because there was no 'no' variant.
The whole thing was confusingly implemented.

Now, the target-specific flag processing gets the driver arg list, and
we use standard hasFlag with a default based on the GCC version and/or
Android platform. The user can still pass the 'no-' variant to forcibly
disable the flag, or pass the positive variant to clang itself to enable
the flag.

The test has also been substantially cleaned up and extended to cover
these use cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168473 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
21261f4f9775d1212b12be5a125ab9f3beca4c12 21-Nov-2012 Joey Gouly <joey.gouly@arm.com> Test commit: Remove blank line.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168436 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
69b77d7fb3265e0e18c91badd50b4cb23dddf3e7 21-Nov-2012 Alexey Samsonov <samsonov@google.com> [Sanitizer] force linking with static sanitizer runtimes on Darwin even if they are not found in resource directory. Add test checking sanitizer linker flags on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168428 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
529a73de04a108fe74503a19d9933dbb2b1a6cf0 19-Nov-2012 Logan Chien <tzuhsiang.chien@gmail.com> Add -ldl for non-static libgcc in Android.

According to Android ABI, we have to link with
libdl.so, if we are linking with non-static libgcc.

Besides, this also fixes MIPS link error of
undefined references to `_Unwind_Find_FDE' and
`dl_iterate_phdr'.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168310 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
18c2842b014a3eafae40dccd713587fa2235772c 19-Nov-2012 Logan Chien <tzuhsiang.chien@gmail.com> Enable -fuse-init-array for Android X86/MIPS.

The dynamic linker of Android does not support .ctors/.dtors.
We should emit .init_array and .fini_array regardless the
gcc version.

NOTE: This patch does not affect the ARM backend, because
it is required to generate .init_array and .fini_array
for program targeting ARM AAPCS and AEABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168309 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7ce816a77dc79f71950e9e96185e3523ee08994b 19-Nov-2012 Chandler Carruth <chandlerc@gmail.com> Completely re-work how the Clang driver interprets PIC and PIE options.

There were numerous issues here that were all entangled, and so I've
tried to do a general simplification of the logic.
1) The logic was mimicing actual GCC bugs, rather than "features". These
have been fixed in trunk GCC, and this fixes Clang as well. Notably,
the logic was always intended to be last-match-wins like any other
flag.
2) The logic for handling '-mdynamic-no-pic' was preposterously unclear.
It also allowed the use of this flag on non-Darwin platforms where it
has no actual meaning. Now this option is handled directly based on
tests of how llvm-gcc behaves, and it is only supported on Darwin.
3) The APIs for the Driver's ToolChains had the implementation ugliness
of dynamic-no-pic leaking through them. They also had the
implementation details of the LLVM relocation model flag names
leaking through.
4) The actual results of passing these flags was incorrect on Darwin in
many cases. For example, Darwin *always* uses PIC level 2 if it uses
in PIC level, and Darwin *always* uses PIC on 64-bit regardless of
the flags specified, including -fPIE. Darwin never compiles in PIE
mode, but it can *link* in PIE mode.
5) Also, PIC was not always being enabled even when PIE was. This isn't
a supported mode at all and may have caused some fallout in builds
with complex PIC and PIE interactions.

The result is (I hope) cleaner and clearer for readers. I've also left
comments and tests about some of the truly strage behavior that is
observed on Darwin platforms. We have no real testing of Windows
platforms and PIC, but I don't have the tools handy to figure that out.
Hopefully others can beef up our testing here.

Unfortunately, I can't test this for every platform. =/ If folks have
dependencies on these flags that aren't covered by tests, they may
break. I've audited and ensured that all the changes in behavior of the
existing tests are intentional and good. In particular I've tried to
make sure the Darwin behavior (which is more suprising than the Linux
behavior) also matches that of 'gcc' on my mac.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168297 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
indowsToolChain.cpp
c35f908d81c5fd62c6755766a422844fedd768ce 17-Nov-2012 Bill Wendling <isanbard@gmail.com> Revert r167799. It's not really correct, and it doesn't fix the problem that it was intended to fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168217 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ecf16265407c4d0edb860dc8259a6874d1a19f6e 16-Nov-2012 Chad Rosier <mcrosier@apple.com> [driver] Add the missing TY_PP_ObjCXX_Alias case to the isCXX function.

This was causing different behavior when using -x objective-c++-cpp-output as
compared to -x objc++-cpp-output. Specifically, the driver was not adding the
-fcxx-exceptions flag in the latter case.
rdar://12680312

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168212 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
75fcb193aeeec5c4f10cc39df60a5ce7526b1b28 16-Nov-2012 Alexey Samsonov <samsonov@google.com> UBSan: enable proper linking with UBsan runtime on Darwin. Turn on building ubsan on OS X in 'make' build system. Patch by Jean-Daniel Dupas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168168 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.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
oolChains.h
ools.cpp
c4a77906c259cba58c147d8468c406a430ecdcbb 15-Nov-2012 Dmitri Gribenko <gribozavr@gmail.com> Use empty parens for empty function parameter list instead of '(void)'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168041 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
5bab9ae87c41148ee2f92d312945c1e9303222e8 15-Nov-2012 Nick Lewycky <nicholas@mxc.ca> Revert r167567, restoring the ability of clang to run gcc in cases where it
can't handle the input file type. This resulted in PR14338.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168024 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
ools.h
ypes.cpp
indowsToolChain.cpp
b12ecd3a3ef0a7010b33759b2310b83d51fbdc9a 13-Nov-2012 Benjamin Kramer <benny.kra@googlemail.com> This patch makes the behavior of clang consistent with the behavior of gcc 4.6 in cases where both -fPIC and -fPIE is used.

- Separately check if -fPIE was specified in the command line and define both __PIC__ and __PIE__ when -fPIE is used. We need to check this separately because -fPIE will infer -fPIC even if its not explicitly used.
- Fixed existing tests.
- Added new tests for cases where both -fPIC and -fPIE is used.

Author: Tareq A. Siraj <tareq.a.siraj@intel.com>
Fixes: PR13221
Review: http://llvm-reviews.chandlerc.com/D94

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167846 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a50059e34309c3adf76c284a68f91c4ca3574782 13-Nov-2012 Bill Wendling <isanbard@gmail.com> Disable accelerator tables when compiling with LTO.

LTO doesn't generate correct accelerator tables. This is due to the general lack
correct of debug info for LTO. Disable it when using LTO.
<rdar://problem/12401423>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167799 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f1eaab122932a5c61b13ce9ae6d590e24558eb84 09-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR14303: Add a NoDriverOption flag to those options which are not accepted by
the driver (the options defined in CC1Options.td) and exclude their help from
"clang --help".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167638 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.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
ools.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
ools.cpp
377e5c108bd299930ca8e8cb6ebce1d22dfe35f9 09-Nov-2012 Bob Wilson <bob.wilson@apple.com> Remove old driver code to grab the iOS simulator version from the -D option.

We can now rely on the -mios-simulator-version-min command line option
and remove the awful hack. <rdar://problem/10304510>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167603 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
458871a13c9f07bb46b4a32e3add0c9cb730f26e 09-Nov-2012 Bob Wilson <bob.wilson@apple.com> Remove more code related to invoking llvm-gcc. <rdar://problem/11991320>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167598 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
d2a527eae6df377b326e8d764782bc34f1e64189 08-Nov-2012 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: The -arch argument values aren't exactly the arch names from a
triple.

- Translate the special case of powerpc to its expected -arch name.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167571 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
85b7f7ddf2f09778ec303f5a39f9e67e3aae1115 08-Nov-2012 Bob Wilson <bob.wilson@apple.com> Rip out a bunch of code for invoking gcc from clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167567 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
ools.h
ypes.cpp
indowsToolChain.cpp
64c4f29ff3b98d412e0235504364096e997b04bb 08-Nov-2012 Bob Wilson <bob.wilson@apple.com> Remove code to fall back to llvm-gcc for i386 kexts.

More cleanups to follow in separate commits....

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167566 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
da05df7ac964abcd18956ffaf6d66ff13a203a11 08-Nov-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Driver] Fix -Wp,-MMD pr13959

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167559 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
03c60765c7607cbfb4e1e8593028824dab13ad54 06-Nov-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/lib/Driver/Tools.cpp: Fix abuse of StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167494 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bb1071c0568db9bd7934e869a53d671632eb9291 06-Nov-2012 Alexey Samsonov <samsonov@google.com> Follow-up for r167411 to un-break ASan on Mac. Move SanitizerArgs to a header file and use it on Darwin toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167460 91177308-0d34-0410-b5e6-96231b3b80d8
anitizerArgs.h
oolChains.cpp
ools.cpp
04fd3820d04032df40ec073a901cade92869c765 06-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Per discussion on cfe-commits, treat -faddress-sanitizer,
-fno-address-sanitizer, -fthread-sanitizer, -fno-thread-sanitizer, and
-fcatch-undefined-behavior as deprecated: produce a warning if they are used
pointing to the corresponding -fsanitize= option. In passing add the missing
'-' to some diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167429 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.cpp
715852c9ce1a0b6afe1928d8da4d51e138aed851 02-Nov-2012 Rafael Espindola <rafael.espindola@gmail.com> Improve x86 android support:
* -Bsymbolic must be added for x86 as well.
* Default CPU name also set to 'core2' for x86 android.
Patch by Edwin Vane.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167307 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
eb52aedbc01f20ddb6e51e2711271324b08ddbef 02-Nov-2012 Richard Smith <richard-llvm@metafoo.co.uk> Add -lpthread when building with Ubsan on Linux, in preparation for making libclang-rt.ubsan pull in sanitizer_common, which in turn depends on pthreads.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167305 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
rg.cpp
rgList.cpp
river.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
1cd46de4840057198607afc875fe9518a78640e1 31-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Remove an extra space with the -iprefix option, so that
matching works correctly.
Part of rdar://12329974


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167173 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
967f3f09f800b6529d74637a73384ee540c8e901 31-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Remove an extra space with the -internal-externc-isystem option, so
that matching works correctly.
Part of rdar://12329974

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167161 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
cfed8283c3aeb03ddd837411467d19e250068d39 31-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> getArchTypeForDarwinArchName is only used in the clang driver, copy it there.
I will remove it from llvm in the next commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167156 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
ools.h
c91b41a64ccce6d1097d85c8c7354ea63a5566a0 31-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Completely rework how superfluous options are stripped out of the crash
diagnostics script.

This addresses the FIXME pertaining to quoted arguments. We also delineate
between those flags that have an argument (e.g., -D macro, -MF file) and
those that do not (e.g., -M, -MM, -MG). Finally, we add the -dwarf-debug-flags
to the list of flags to be removed.
rdar://12329974

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167152 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
bfd452ea9b362a0e5d8e2b8d599ad9f4092ce29e 31-Oct-2012 Simon Atanasyan <satanasyan@mips.com> Fix if-else braces layout accordingly to the style guide.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167118 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e01575447635fae1365fc94a8dbb82b31e86ab09 31-Oct-2012 Simon Atanasyan <satanasyan@mips.com> Extend -Bprefix functionality and make it closer to gcc. If the "prefix"
is not a directory, Driver::GetProgramPath() routine does not try to append
the program name as a "path component" to it. It just joins the "prefix" with
the program name and checks the resulting path existence.

The patch reviewed by Rafael Espindola.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167114 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8c610b075cb2f9dae1178ab881a0aa9f91b9bcd5 31-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Remove the -ccc-no-clang option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167093 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e6c3458723d954d1ba9b73a2d93d2e2d67dd3510 31-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Remove ccc-no-clang-cpp, which is also dead now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167062 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
89aa2ce6d6de2b9200171bd3ecc97fe917f73d62 30-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Older versions of ld expect '-L<dir>' not '-L <dir>'. In Xcode4 and
later, '-L <dir>' is allowed, but rewrite these in the driver as '-L<dir>' to
maintain backward compatibility. The same is true for the -I option.
rdar://12366753

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167054 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d2d4d68a58898c5d13d66d45a5d9440fc1d790fe 30-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> In the past "production" clang builds would not be used for c++, and
we had the -ccc-clang-cxx and -ccc-no-clang-cxx options to force them
on or off for testing.

Clang c++ support is now production quality and these options are dead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166986 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2902829d27ca3d3bb24d55dd99e8a218cc3a415f 30-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Remove a bit of dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166983 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.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
ools.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
ools.cpp
ccb428bb04adaa909431d6e929b8f9e6bdbe7208 26-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [driver] Before applying the working directory check if the input path
is absolute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166808 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a049bbb3441010880486b82a7d0d284ab9afc4c9 26-Oct-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [options] Fix mishandling of aliased options that was introduced in r166444.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166801 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
8e1cee6f23e2552b96b81e5ef419ab3f69c5b5c2 25-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3667bbe0f235a8b3fc2496acc8f3136dfb559cc9 23-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Handle -pthread, -pg and -shared correctly on bitrig.
Patch by David Hill.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166483 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
rg.cpp
rgList.cpp
C1AsOptions.cpp
river.cpp
riverOptions.cpp
ptTable.cpp
ption.cpp
ools.cpp
2e4e110a727a0d379a8fbd0cc2afba1ff3801091 22-Oct-2012 Daniel Dunbar <daniel@zuster.org> driver/Darwin: Default to AAPCS for M-class CPUs.

- This is an assumption that is currently hardwired into the backend, we need
to do this in order for the frontend and backend to agree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166428 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6592c770777069678026f535d723779b0150205e 21-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Silence warning about && in ||.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166391 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
f4bd32957c686891cbdb7e2124630f6686343a2a 21-Oct-2012 Simon Atanasyan <satanasyan@mips.com> Add support of MIPS n32 ABI to the Clang driver. The fix builds correct library/object files paths and passes appropriate command line options to the linker if user provides -mabi=n32 option.

The patch reviewed by Rafael Espindola.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166389 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.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
river.cpp
oolChains.cpp
ools.cpp
e4151c5d1b48efac740b89cc16e5054850cbdecb 20-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] make Option a value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166347 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.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
rg.cpp
rgList.cpp
river.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
ools.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
ools.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
river.cpp
oolChains.cpp
ools.cpp
97b8fd941475ec233b329a21a4ec94698f8a4b5b 18-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] make Option a value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166223 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
891dac73bdb090ff845982e4334f5b4c18353dbe 16-Oct-2012 David Chisnall <csdavec@swan.ac.uk> GNUstep runtime version default to 1.6, generate correct property attribute
metadata.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166023 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7a0c064770355a4918df69f95de8dea6338a59a2 16-Oct-2012 Daniel Dunbar <daniel@zuster.org> Un-revert r164907 and r164902 (+ follow-ups), 10.6 build fix to follow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165988 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
dc0d4e251b4c41b75c5d93f1866a8a0952b1c6ae 15-Oct-2012 Nico Weber <nicolasweber@gmx.de> Revert r164907 and r164902 (+ follow-ups). They broke building on 10.6.

See PR14013.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165962 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
bc0a925caac5e1a8201af4e8500da0bc4bd4d955 11-Oct-2012 Eric Christopher <echristo@gmail.com> Revert "[Options] make Option a value type."

Author: Michael J. Spencer <bigcheesegs@gmail.com>
Date: Wed Oct 10 21:48:26 2012 +0000

[Options] make Option a value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165663 91177308-0d34-0410-b5e6-96231b3b80d8

This reverts commit 0464fd5e4ce2193e786e5adcab6b828f9366dae3.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165667 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
0464fd5e4ce2193e786e5adcab6b828f9366dae3 10-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] make Option a value type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165663 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
238b6a9d33bf87e23f86866885394cd453a06495 09-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> The clang driver has a fairly fancy support for executing gcc instead of
clang itself. This dates back to clang's early days and while it looks like
some of it is still used (for kext for example), other parts are probably dead.

Remove the -ccc-clang-archs option and associated code. I don't think there
is any remaining setup where clang doesn't support an architecture but it can
expect an working gcc cross compiler to be available.

A nice side effect is that tests no longer need to differentiate architectures
that are included in production builds of clang and those that are not.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165545 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
96a6eb910a25f083c173e333cc21f1e0b783de4d 09-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Remove redundant cases due to overlapping commits between Ted (r165531, 165532) and I
(r165534), but leave the test case in place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165537 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4def70d3040e73707c738f7c366737a986135edf 09-Oct-2012 Richard Smith <richard-llvm@metafoo.co.uk> -fcatch-undefined-behavior: emit calls to the runtime library whenever one of the checks fails.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165536 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d372a70c6845efcfc88edc37341f795fc70750c7 09-Oct-2012 Chad Rosier <mcrosier@apple.com> [driver] Remove the -W[no-][int-conversion|constant-conversion|enum-conversion]
options when clang invokes cc1plus for i386 kexts.
rdar://12459188


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165534 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2c3d8fad4f760b076deaa9a24923a2f48f31c8b2 09-Oct-2012 Ted Kremenek <kremenek@apple.com> Don't forward -Wenum-conversion to cc1plus.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165532 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
28e2aff71284b12c4819ad11dfd46cf019dfeb5c 09-Oct-2012 Ted Kremenek <kremenek@apple.com> Don't forward -Wint-conversion to cc1plus.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165531 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8e6881dfa47ec5bd95f1d6d83f302482c242e073 08-Oct-2012 Chandler Carruth <chandlerc@gmail.com> Make Bitrig's clang understand -stdlib= correctly.
With this patch Bitrig can use a different c++ library without pain and
within the normal commandline parameters.

Original patch by David Hill, with lots of fixes and cleanup by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165430 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
64f7ad9328e877779ec63638f39de4e10d2ff276 07-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Use getArch instead of getArchName + string compare.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165370 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
indowsToolChain.cpp
a4a809e23ef17bef21afc50e70412a77567807ae 07-Oct-2012 Rafael Espindola <rafael.espindola@gmail.com> Use getArch instead of getArchName.

The darwin change should be a nop since Triple::getArchTypeForDarwinArchName
doesn't know about amd64.

If things like amd64-mingw32 are to be rejected, we should print a error
earlier on instead of silently using the wrong abi.

Remove old comment that looks out of place, this is "in clang".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165368 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
indowsToolChain.cpp
e20e508aecf413f84b0dc4928cbf4bb5ce6c5bdc 04-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Driver: Link crtfastmath.o if it's available and -ffast-math is specified.

crtfastmath.o contains routines to set the floating point flags to a faster,
unsafe mode. Linking it in speeds up code dealing with denormals significantly
(PR14024).

For now this is only enabled on linux where I can test it and crtfastmath.o is
widely available. We may want to provide a similar file with compiler-rt
eventually and/or enable it on other platforms too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165240 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
cbdc1a3432c897c11b6d256d556a8a11368729ad 04-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Prefer StringRef::startswith to the strncmp/strlen contraption.

This may be slightly more efficient and is definitely more readable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165217 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
429fce9945f2792ca50c864de63ac3c0395e4ad5 04-Oct-2012 Logan Chien <tzuhsiang.chien@gmail.com> Fix typo in comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165216 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2df1bd44319a60a9beb26511d6e2997a3f4f67ff 03-Oct-2012 Benjamin Kramer <benny.kra@googlemail.com> Fix invalid reads by memcmp.

Str may be smaller than Start->Name here. Use strncmp to avoid scanning past the
end. Found by valgrind.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165157 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
9b7dcdb53cee4234c48bb4ceeef39536419945cf 03-Oct-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] Store the owning OptTable in Option so it can construct Group and Alias.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165150 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
fc44e88cbdf013d285f2e4e3962fb80dcad56770 03-Oct-2012 Simon Atanasyan <satanasyan@mips.com> Remove useless parameter "WantFile" from Driver::GetProgramPath().
This parameter is useless because nowhere used explicitly and always
gets its default value - "false".

The patch reviewed by Rafael Espindola.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
f8d9bd546811a56ebb0b581ce4cc6043b51659a1 03-Oct-2012 Simon Atanasyan <satanasyan@mips.com> Implement Adnroid MIPS toolchain support:
1. Add mipsel-linux-android to the list of valid MIPS target triples.
2. Add <gcc install path>/mips-r2 to the list of toolchain specific path
prefixes if target is mipsel-linux-android.

The patch reviewed by Logan Chien.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165131 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
bd59a010b5f1242b548bda1384a7a0ebbabf552d 03-Oct-2012 Logan Chien <tzuhsiang.chien@gmail.com> Fix typo in comments.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165105 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6acf8b4f9418be93a24b493c2f8a7d32c203002d 02-Oct-2012 Bill Wendling <isanbard@gmail.com> During LTO, we call 'dsymutil' when we compile source files. This necessitates
clang specifying a temporary file that it later cleans up so that it can survive
the linking stage. However, when we compile object files during LTO we don't
call 'dsymutil'. That's done at a different stage (if at all). We rely upon the
linker to specify a unique name for the temporary file it generates.
<rdar://problem/12401423>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165028 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
f2f3ce54fc1235bec2d0d0b0ef3b53bdff6d9655 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Add Clang support for iOS6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164907 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
336bfa3fb496228a8ab4070def5b4297e5f88358 30-Sep-2012 Bob Wilson <bob.wilson@apple.com> Add armv7s and some other arm variants supported by Mach-O files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164905 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
a5ee089fffc9c98d454694f80e7b541e97ca495e 28-Sep-2012 Fariborz Jahanian <fjahanian@apple.com> Modern objcective-C translator. When doing rewriting, Do not
use the integrated pre-processor, preprocess in objective-c++ mode.
// rdar://12189793.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164836 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
f3477c13eeaf11b32a41f181398fb5deffd0dd73 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Revert 'Fix a typo 'iff' => 'if''. iff is an abreviation of if and only if. See: http://en.wikipedia.org/wiki/If_and_only_if Commit 164766

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164769 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
94ff8e1f57c6382d91d0de981a4f311509d83e37 27-Sep-2012 Sylvestre Ledru <sylvestre@debian.org> Fix a typo 'iff' => 'if'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164766 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
99c720828a2fcaf368c6a0f2502189d10dbd5c53 26-Sep-2012 Benjamin Kramer <benny.kra@googlemail.com> Allow -MF to be used in combination with -E -M or -E -MM.

Fixes PR13851. Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164717 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
663117ab56390a18f4157ca84c9a92e5c6cad054 26-Sep-2012 Michael J. Spencer <bigcheesegs@gmail.com> [Options] Store the option ID in OptTable::Info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164644 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
riverOptions.cpp
ptTable.cpp
ption.cpp
80ecf5e66738a7058da58489ca55200212f3d42c 26-Sep-2012 Chad Rosier <mcrosier@apple.com> [driver] Add support for the -fno-fast-math option.
rdar://12299433

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164638 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
70e5b575e187beb10f4a10667d9f4f5227131c40 24-Sep-2012 Anna Zaks <ganna@apple.com> [analyzer] Really turn on dynamic-bifurcation on by default.

Thanks to Byoungyoung for realizing taht we are not passing the default
option correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164543 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
03a86385d6628398e1671db1d1970eb83ef0f8b3 23-Sep-2012 Rafael Espindola <rafael.espindola@gmail.com> Implement ToolChain::IsUnwindTablesDefault to reduce code duplication a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164473 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
76f74ad696abe882e4ee6466913f554580ec5a59 23-Sep-2012 Rafael Espindola <rafael.espindola@gmail.com> On Hexagon getArchName() never returns x86_64, simplify the function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164470 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6f009b68b9f7aaf280144b0cd81d6a0b23c733a6 22-Sep-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix pr13749. There is still a lot of code using getArchName that should be
using getArch, but I will try to fix them one at time to add tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164460 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8e1c598310d5cd75700cf800cb333b985ce05420 21-Sep-2012 Simon Atanasyan <satanasyan@mips.com> Add four new command line options for MIPS CPU selection:
-mips32, -mips32r2, -mips64, -mips64r2.

The patch reviewed by Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164410 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
02014b485394cc93e0a2bd386e94424a5707ea69 19-Sep-2012 Hal Finkel <hfinkel@anl.gov> Add C/C++ header locations for the Freescale SDK.

The Freescale SDK is based on OpenEmbedded, and this might be useful
for other OpenEmbedded-based configurations as well.

With minor modifications, patch by Tobias von Koch!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164177 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7de32964026e4c5ff32cbca484ffb24e73393d87 19-Sep-2012 Hal Finkel <hfinkel@anl.gov> Add e500mc and e5500 to the list of valid PPC CPU names.

Patch by Tobias von Koch!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164176 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7a9188833a6a09d574144334c9584c417b809007 14-Sep-2012 Simon Atanasyan <satanasyan@mips.com> Do not use "lib32" directory to create a library/object files
paths when target is MIPS 32-bit.

The patch reviewed by Chandler Carruth.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163898 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6f85b1e7906f7a03cbede1f730ba19b28a5f85e8 14-Sep-2012 Bob Wilson <bob.wilson@apple.com> Improve the driver title as shown in the --help message. <rdar://12297538>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163870 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2df67ea86f64c2a94b973d8fda2e3c1fd53fc84d 13-Sep-2012 Silviu Baranga <silviu.baranga@arm.com> This patch introduces A15 as a target in Clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163804 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.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
ools.cpp
dc6cc87ab68091a714526b391e2a1291d84d485e 13-Sep-2012 Eric Christopher <echristo@apple.com> Properly link libpthread_p when using profiling on OpenBSD.

Patch by Brad Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163777 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
53b43a78d575e9e8d0af7a3f4b0a744679d65994 12-Sep-2012 Joerg Sonnenberger <joerg@bec.de> Claim --param ssp-buffer-size, even if the stack protector is not
active.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163705 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ba7541f12b39aeef4cdb104566dd0503321f48f 12-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Make -faddress-sanitizer on Android link to the new-style runtime.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163689 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9f0b1324a5352713337c75ef4a5acffd96609c6c 11-Sep-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-2012_09_10
a92983d236c88c942c283a1ee98003b2d5b56ea5 10-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Wrong crtbegin/crtend pair used for PIE on Android.

Android uses the same flavour of crt*.o for PIE and non-PIE executables, and a
different one for DSOs. GNU/Linux, on the other hand, uses one set of crt*.o
for non-PIE executables, and another for both PIE executables and DSOs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163500 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
89d83ff23414240555f895d3dad736bd30f5af4e 10-Sep-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Use -march=arch option to select either generic MIPS ISA,
or the name of a particular processor.

The patch reviewed by Douglas Gregor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163492 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f6513810c9e5bb75336b69e08cf99cc8ba97175f 07-Sep-2012 Roman Divacky <rdivacky@freebsd.org> Link to crtend.S when PIE in the FreeBSD driver. Patch by Brooks Davis!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163388 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c55da4bc1d9bfd7ace9c2bd99f98bc4cf09cd27b 05-Sep-2012 Eric Christopher <echristo@apple.com> Apply some driver improvements for freebsd-*-mips*.

Patch by Brooks Davis.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163249 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5d9cb1b9880f3cc5a96950644da6bf9c2b76149f 04-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Revert r163076 per chandlerc's request.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163146 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
1d01afe4d5883d7ec538b739aa7922d7de46f192 03-Sep-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Android standalone toolchain support.

This change adds detection of C++ headers and libraries paths when
building with the standalone toolchain from Android NDK. They are in a
slightly unusual place.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163109 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
94a7142f74bb4a9daa53c22087b19d4568073109 02-Sep-2012 Logan Chien <tzuhsiang.chien@gmail.com> Rename ANDROIDEABI to Android.

Most of the code guarded with ANDROIDEABI are not
ARM-specific, and having no relation with arm-eabi.
Thus, it will be more natural to call this
environment "Android" instead of "ANDROIDEABI".

Note: We are not using ANDROID because several projects
are using "-DANDROID" as the conditional compilation
flag.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163088 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
c4f0f463fef75884063da5bde615f1f8a9d45b57 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Fixed typo causing tests to fail on non-MSVC machines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163077 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
601944aeaf1369f92b90e5c279c22f557eb87cdb 02-Sep-2012 Joao Matos <ripzonetriton@gmail.com> Refactored the Windows headers location lookup code. Expose it so standalone tools can have access to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163076 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
50f88b99c60c2ed31b339cd8bd484766cc9e916b 30-Aug-2012 Nico Weber <nicolasweber@gmx.de> Reland r160052: Default to -std=c++11 on Windows.

Also update the tests that rely on c++98 to explicitly mention that.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162890 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ecbbea47659c13ef4193879001f606868757007e 30-Aug-2012 Bill Wendling <isanbard@gmail.com> Emit .gcda files as absolute paths instead of relative paths.

This improves compatibility with gcc in this regard, and this file generation
can be ameliorated with GCOV_PREFIX and GCOV_PREFIX_STRIP. It's also useful if
your build directory doesn't specify -o <abspath> and it uses a recursive make
structure, so it's not relative to the toplevel.

Patch by Joshua Cranmer!
<rdar://problem/12179524>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162884 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9438016db2332aca8b53fd953da06128373cc5be 28-Aug-2012 Roman Divacky <rdivacky@freebsd.org> Cleanup FreeBSD linking and add support for -pie.

Path by Brooks Davis, tests and fixes from me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162761 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9804b761a9743c8248864e94018e4dc26577d471 27-Aug-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Use -G option to specify MIPS section threshold. Translate it
to the -mllvm -mips-ssection-threshold=<value> pair and pass to the frontend.
The patch suggested by Carl Norum.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162697 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
80fd37a57176433d05854dff27b9c5fa869fadd2 27-Aug-2012 John McCall <rjmccall@apple.com> Tweak the ARC-requires-10.6 diagnostic according to Jordan's review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162651 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
80ea4bc944eb01c220eeaa004b21ad709ba928e1 24-Aug-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge_2

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: If47d0d39459760017258502b4d9e859ac36a273b
04a42791609ea958bcb13c84e97118f1a3007eb9 21-Aug-2012 Michael J. Spencer <bigcheesegs@gmail.com> Reduce the amount of state in the Option class by relying on the data from OptTable::Info.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162299 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.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
ools.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
oolChains.cpp
oolChains.h
ools.cpp
279e0be96cb51f6eb25c5ef21066c50d8a667826 21-Aug-2012 David Blaikie <dblaikie@gmail.com> Fix -Wswitch warning introduced by r162231

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162236 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
4327557dfafe16c031691ed061f52a708e4c6b7a 20-Aug-2012 Michael J. Spencer <bigcheesegs@gmail.com> Make Option non virtual.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162231 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
ption.cpp
9101bc5f4d6defe71e8a368c5275f447da7769fd 17-Aug-2012 Daniel Dunbar <daniel@zuster.org> darwin/driver: Support using SDKROOT to define the default for -isysroot.
- The SDKROOT environment variable is the de facto way to set the default SDK
for a number of tools, join forces with them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162116 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e276cfc4e30dd3d85e3904ee270e85d5d0e309ad 17-Aug-2012 Nick Lewycky <nicholas@mxc.ca> Fix -Wl,--no-demangle to actually pass the flag to the linker on Linux instead
of silently dropping it on the floor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162075 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c9c48dba2004b9d25e96d02e12b932a8826c6632 10-Aug-2012 Eli Friedman <eli.friedman@gmail.com> Followup to r161546, to unbreak linking on Bitrig. Patch by David Hill.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161630 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
42f74f21ece01dc8573d5377859d327fbb23b26c 09-Aug-2012 Eli Friedman <eli.friedman@gmail.com> clang support for Bitrig (an OpenBSD fork); patch by David Hill.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
a7635f115ed4fdc5f7982989d67743105dd530cf 07-Aug-2012 Bob Wilson <bob.wilson@apple.com> Don't complain about -fobjc-link-runtime being unused with -fobjc-arc.

If you build with -fobjc-arc, then -fobjc-link-runtime is implied but we
don't need to warn about it being unused in that case. rdar://12039965

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161444 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b019489d42da42a2071986d74e454e39bde59039 07-Aug-2012 Ted Kremenek <kremenek@apple.com> Handle null suffixes in GetTemporaryPath (PCH files don't have suffixes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161367 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
04c3a25bd45ad8a6ad715783aee03df7284c5591 06-Aug-2012 Richard Smith <richard-llvm@metafoo.co.uk> PR13529: Don't crash if the driver sees an unused input file when running as
'clang-cpp'.

For now, the test uses "REQUIRES: shell" to determine if the host system
supports "ln -s", which it uses to create a 'clang-cpp' symlink. This is a bit
hacky and should likely be directly supported by lit.cfg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161317 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
51a0a94b841e64814e63f9f172c6c4ae5d8ff286 03-Aug-2012 Fariborz Jahanian <fjahanian@apple.com> Make property synthesis the default on Windows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161266 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ee959355b93c0648fea88dc986d196e3705407dc 03-Aug-2012 Shih-wei Liao <sliao@google.com> Apply changes to migrate to CLANG-160673-20120724.

Change-Id: I00d23ac9b893c62dca281ec771eeb5f911854bae
ndroid.mk
08fc8eb5a1cc9c01af67e016ab21c9b905711eb1 03-Aug-2012 Shih-wei Liao <sliao@google.com> Merge with Clang upstream r160673 (Jul 24th 2012)

Conflicts:
lib/Sema/SemaDeclAttr.cpp

Change-Id: I37f02f20642a037b9da8d35fefa01986cd250b14
d6261a96cd470c148c474c8ebeacabc40e0ebb37 02-Aug-2012 Chad Rosier <mcrosier@apple.com> [driver] Lipo can handle the lto-bc type.
rdar://12000401

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161216 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
ff104a12d61d34af67f12a7a966847c821d7afa8 31-Jul-2012 Jiangning Liu <jiangning.liu@arm.com> Support ARM hard float (arm-linux-gnueabihf).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161038 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
761322b3bdea727de087dcdf355fee689f5b8358 31-Jul-2012 Aaron Ballman <aaron@aaronballman.com> No longer emitting a PCH file when using -fsyntax-only on a header file. Fixes PR13343.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161019 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
6cc9dc8403c4a8838f4f932e43402090cfe70d98 30-Jul-2012 Jiangning Liu <jiangning.liu@arm.com> Fix dynamic object linker for ARM GNUEABIHF.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160958 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dfa210b1e1e403855557f68fe471212787b8540e 29-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Provide correct linker command line options on FreeBSD 8 (GNU ld 2.15) and on newer FreeBSD (GNU ld 2.17).

Patch by Dimitry Andric!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160931 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
11abf2ad01f64ede7c0555167f41a1c5852f80c6 27-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/lib: [CMake] Update tblgen'd dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160851 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
866abce3b93ab01bac00e0383a753819893b868a 27-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> clang/lib: [CMake] Reformat, alphabetize lists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160850 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
699c6cd0b99f715b6638c8d49f1dfee22f30aabe 25-Jul-2012 Chad Rosier <mcrosier@apple.com> [driver crash diagnostics] Strip -internal-isystem and -internal-externc-isystem.
rdar://11949066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160752 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a4ba28f3215b4ea70d0cf15026edbfb535e2f0d3 25-Jul-2012 Chad Rosier <mcrosier@apple.com> [driver crash diagnostics] Strip -idirafter, -iprefix, -iwithprefix,
-iwithprefixbefore, and -isystem options, per Matt's suggestion.
rdar://11949066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160750 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
37302ead1c067ec984a75e847cd83c6881637e72 25-Jul-2012 Chad Rosier <mcrosier@apple.com> [driver crash diagnostics] A few enhancements:
-Strip -iquote and -M options.
-Quote -D options to avoid problems with command line macros that include
parens.
rdar://11949066

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160743 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
f925e0414d76d39d612d54d233e9fa2ee04b0a27 20-Jul-2012 Chad Rosier <mcrosier@apple.com> Add a new flag, -fms-inline-asm, that enables the output of MS-style inline
assembly.

By default, we don't emit IR for MS-style inline assembly (see r158833 as to
why). This is strictly for testing purposes and should not be enabled with the
expectation that things will work. This is a temporary flag and will be removed
once MS-style inline assembly is fully supported.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160573 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
a1ec3db3a1ab7c37f1d7604bef777fe54711d8f0 19-Jul-2012 Bob Wilson <bob.wilson@apple.com> Force the OS X version to 10.6 for old-style simulator builds.

The hack of recognizing a -D__IPHONE_OS_VERSION_MIN_REQUIRED option
in place of -mios-simulator-version-min leaves the Darwin version
unspecified. It can be set separately with -mmacosx-version-min (which
makes no sense) or inferred to match the host version (which is unpredictable
and usually wrong). This really needs to get cleaned up, but in the
meantime, force the OS X version to 10.6 so that the behavior is sane for
the iOS simulator. Thanks for Argyrios for the patch.
<rdar://problem/11858187>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160484 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
df9b933aa354b8108cee028cc4726cfa9f2df62c 17-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> [Win32] Rework crash-report since r145389.

- lib/Driver/Driver.cpp, tools/driver/driver.cpp: Exit status should not be propagated, although clang driver should catch exceptions.
- test/Driver/crash-report.c: Add REQUIRES:shell for now.
FIXME: setenv should work also on Lit.InternalShellRunner.
- test/Driver/crash-report.c: Remove XFAIL.

Thanks to Chad, To point out the issue.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160343 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7dae689d322ae2a84b82f4762af780bb3f84b251 15-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Enable new linker behaviour on FreeBSD.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160231 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6a1f94b89bb497522ad0601350cbd47068fce5f1 12-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert r160052, "Default to -std=c++11 on Windows.", for now.

Failing Tests (3):
Clang :: Index/complete-cxx-inline-methods.cpp
Clang :: Index/recursive-cxx-member-calls.cpp
Clang :: SemaTemplate/inject-templated-friend-post.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160103 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0337efdba2b9477c2655cbb176d59c492a823aa4 11-Jul-2012 Chad Rosier <mcrosier@apple.com> [driver] Fix so that clang can find correct path prefix for libc object files
from GNU binutils supporting multi-arch folder for ARM target.
Patch by Jiangning Liu <jiangning.liu@arm.com>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160060 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
85663e7b40097b2f162f58ba9f4dae2d0f24f648 11-Jul-2012 Nico Weber <nicolasweber@gmx.de> Default to -std=c++11 on Windows.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160052 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6467c9bf4f07f54789d3ed902f04048f4d80ad47 09-Jul-2012 Chad Rosier <mcrosier@apple.com> 80-column and whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159942 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e8cf7d143446c45568bb7c9a6fbd8f32ca6ae93e 07-Jul-2012 Ted Kremenek <kremenek@apple.com> Re-apply r159875 with fixes.

- Split pedantic driver flag test into separate test file, and XFAIL on cygwin,mingw32
- Fix bug in tablegen logic where a missing '{' caused errors to be included in -Wpedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159892 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3b4c53259603ba389373362f476648b2b1ab9eca 07-Jul-2012 NAKAMURA Takumi <geek4civic@gmail.com> Revert rr159875, "Implement -Wpedantic and --no-pedantic to complement -Weverything." It broke several builds.

I suspect FileCheck might match assertion failure, even if clang/test/Misc/warning-flags.c passed the test.

> 0. Program arguments: bin/./clang -### -pedantic -Wpedantic clang/test/Driver/warning-options.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159886 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
25570a94ca6b706d19812b0f8df25a63ec3445c8 07-Jul-2012 Ted Kremenek <kremenek@apple.com> Implement -Wpedantic and --no-pedantic to complement -Weverything.

This patch introduces some magic in tablegen to create a "Pedantic" diagnostic
group which automagically includes all warnings that are extensions. This
allows a user to suppress specific warnings traditionally under -pedantic used
an ordinary warning flag. This also allows users to use #pragma to silence
specific -pedantic warnings, or promote them to errors, within blocks of text
(just like any other warning).

-Wpedantic is NOT an alias for -pedantic. Instead, it provides another way
to (a) activate -pedantic warnings and (b) disable them. Where they differ
is that -pedantic changes the behavior of the preprocessor slightly, whereas
-Wpedantic does not (it just turns on the warnings).

The magic in the tablegen diagnostic emitter has to do with computing the minimal
set of diagnostic groups and diagnostics that should go into -Wpedantic, as those
diagnostics that already members of groups that themselves are (transitively) members
of -Wpedantic do not need to be included in the Pedantic group directly. I went
back and forth on whether or not to magically generate this group, and the invariant
was that we always wanted extension warnings to be included in -Wpedantic "some how",
but the bookkeeping would be very onerous to manage by hand.

-no-pedantic (and --no-pedantic) is included for completeness, and matches many of the
same kind of flags the compiler already supports. It does what it says: cancels out
-pedantic. One discrepancy is that if one specifies --no-pedantic and -Weverything or
-Wpedantic the pedantic warnings are still enabled (essentially the -W flags win). We
can debate the correct behavior here.

Along the way, this patch nukes some code in TextDiagnosticPrinter.cpp and CXStoredDiagnostic.cpp
that determine whether to include the "-pedantic" flag in the warning output. This is
no longer needed, as all extensions now have a -W flag.

This patch also significantly reduces the number of warnings not under flags from 229
to 158 (all extension warnings). That's a 31% reduction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159875 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
d797a85866fd5ce62850dd145396b451364032a3 05-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159769 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dc536f55c0c85df7644592c69434b7b191d73dc8 05-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Factor out the code converting command line options to target features.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159767 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0b273efa37a38deab77dadf72540c9c07c63f8cf 05-Jul-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Add -mips16 / -mno-mips16 command line support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159747 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2c7886ddec1e2cee68daee9866637d2e02f434ef 04-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Hoist the logic for selecting the Objective-C dispatch method into the runtime
class, from the target. No functionality change, just less duplicated logic.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159710 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
a422cd0ed4da8cb5a172498f29bb02065707c6ce 04-Jul-2012 David Chisnall <csdavec@swan.ac.uk> A few more cleanups for the GNU family of ObjC runtimes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159708 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4e6e791dc53654dd1e6258829d5c3a1e059b11c3 04-Jul-2012 Bob Wilson <bob.wilson@apple.com> Move a comment from the commit message into the code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159696 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
11d3f4cc27e6b923fc32481dc1bb5ec46c7d1f4b 03-Jul-2012 David Chisnall <csdavec@swan.ac.uk> Rename the GCC Objective-C runtime to gcc from gnu-fragile and the GNUstep
runtime to gnustep from gnu. Fix EH for the GCC runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159684 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
1fc6e4fa79444b2a7be8a1150f646ffbde68b744 03-Jul-2012 Bob Wilson <bob.wilson@apple.com> When using -pg targeting OS X 10.8, pass -no_new_main to the linker.

By default on OS X 10.8, we don't link with a crt1.o file and the linker
knows to use _main as the entry point. But, when compiling with -pg, we
need to link with the gcrt1.o file, and the linker needs to be told to use
the "start" symbol as the entry point. The -no_new_main linker option does
that last part. <rdar://problem/11491405>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159683 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ec956d82bceb1c471f4ae18541b78e431f7fbb20 02-Jul-2012 David Blaikie <dblaikie@gmail.com> Include -D files in crash report repro scripts. (PR13255)

Now that we're only using -frewrite-includes rather than full preprocessing
when producing repro source files, we should also include command line macro
definitions in the repro script.

I don't have a test case for this because I'm not sure if/how I can open the
crash report file when the name is only known by scraping the crash report
output. Suggestions welcome if anyone thinks it'd be helpful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159592 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e75d9cfbf41a0ee9e456a665776f91fdd9773b36 30-Jun-2012 David Blaikie <dblaikie@gmail.com> Use -frewrite-includes for crash reports.

In future changes we should:
* use __builtin_trap rather than derefing 'random' volatile pointers.
* avoid dumping temporary files into /tmp when running tests, instead
preferring a location that is properly cleaned up by lit.

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159469 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
92c4fd5c17a5fd433cca7ddecb0ad4a104baa59c 27-Jun-2012 Benjamin Kramer <benny.kra@googlemail.com> Enable -mcpu=native and -march=native for arm targets.

This is only implemented on linux at the moment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159232 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
e48601573b9631600f563957476edb3b9cd41387 21-Jun-2012 John McCall <rjmccall@apple.com> Adjust this code so that it strictly honors
TargetSimulatroVersionFromDefines if present; this also makes
it easier to chain things correctly. Noted by an internal
review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158926 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7f3260764a3614e22dcf24d71c1155f14a9b4e6e 21-Jun-2012 Alexey Samsonov <samsonov@google.com> Improve support for -g options accepted by Clang:
1. Accept flags -g[0-3], -ggdb[0-3], -gdwarf-[2-4] and collapse them to simple -g (except -g0/-ggdb0).
2. Produce driver error on unsupported formats (-gcoff, -gstabs, -gvms) and options (-gtoggle).
3. Recognize and ignore flags -g[no-]strict-dwarf, -g[no-]record-gcc-switches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158906 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b0d8671f95fe08a220118bca29063ba4d11a9dac 21-Jun-2012 Chandler Carruth <chandlerc@gmail.com> Remove a goofy CMake hack and use the standard CMake facilities to
express library-level dependencies within Clang.

This is no more verbose really, and plays nicer with the rest of the
CMake facilities. It should also have no change in functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
8ab6c24076444fc6bda9a28c1100ba106ddffaa6 20-Jun-2012 Ted Kremenek <kremenek@apple.com> Revert "Provide a -no-pedantic to cancel out -pedantic." This needs to be designed
a bit further. We may wish to just have -Wno flags to silence warnings, and not have a -no-pedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158796 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
13223073a94f8df6527193827192a326d50877fb 19-Jun-2012 Chad Rosier <mcrosier@apple.com> [driver] Per Bob's suggestion, emphasize the file dumps.
rdar://11684107

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158734 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4f6a4b47675a30e621251fcda1d192a2c17c6eea 19-Jun-2012 Chad Rosier <mcrosier@apple.com> [driver] Print the compiler version before the diagnostic messages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158729 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
235a663d407182cb4e0f680df30ec9b6cfda0544 19-Jun-2012 Chad Rosier <mcrosier@apple.com> [driver] Make the crash diagnostic message more visable. Bug reports are being
filed, but still missing the preprocessed source and associated run script.
rdar://11684107

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158727 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
a2284f5dcab3201bb9dd37568a3bed2041f1ab0b 18-Jun-2012 Michael J. Spencer <bigcheesegs@gmail.com> [VS Toolchain] Correctly forward -l linker inputs to link.exe.

Patch by Nikola Smiljanic!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158664 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
940152f726353e08e3bdcef6f85bc8aa73173597 14-Jun-2012 David Blaikie <dblaikie@gmail.com> Support -f[no-]rewrite-includes from the driver.

Review by Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158463 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dc9327a8da640ecf7b15c5d5b726cd67a0e63284 13-Jun-2012 John McCall <rjmccall@apple.com> Provide a -no-pedantic to cancel out -pedantic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158416 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
02a84277864e5476b12c0ec687ed09f0b2922471 12-Jun-2012 Hal Finkel <hfinkel@anl.gov> Add PPC support for translating gcc-style -mcpu options into LLVM -target-cpu options.

This functionality is based on what is done on ARM, and enables selecting PPC CPUs
in a way compatible with gcc's driver. Also, mirroring gcc (and what is done on x86),
-mcpu=native support was added. This uses the host cpu detection from LLVM
(which will also soon be updated by refactoring code currently in backend).

In order for this to work, the target needs a list of valid CPUs -- we now accept all CPUs accepted by LLVM.
A few preprocessor defines for common CPU types have been added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158334 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
a08e7bc74b5635995fc50009f240dd3feb1999e2 06-Jun-2012 Francois Pichet <pichet2000@gmail.com> Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.

Only 1 minor code change was necessary: can't use cdecl as variable name anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
d5ba9372c25c0a535f3ea244e82a12a4cbfe0a27 04-Jun-2012 Jordan Rose <jordan_rose@apple.com> Remove AST and Parse from Driver's dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157933 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
837386287f1527c3a1e7ac2ea330c714519ae33a 04-Jun-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Require -pie when linking with ASan on Android.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157923 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5e62779634ba002d7112a66efc8e075de9b8a3f1 02-Jun-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Factor out code selects the float ABI as determined by -msoft-float,
-mhard-float, and -mfloat-abi= to the new function getMipsFloatABI. That
simplifies reuse of this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157888 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1f0646e064c2d853d64db8585f661cacdde75c43 29-May-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Pass -KPIC argument to MIPS assembler if necessary.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157635 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
003ab6682376a0e4544df295bddcf0d991275c40 29-May-2012 Simon Atanasyan <satanasyan@mips.com> Factor out the code retrieves the last PIC related argument from
the Clang::ConstructJob() to the new ArgList::getLastArg() routine
with eight argument. That simplifies reusing of this code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157633 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
a9cd83b1ddfa7d05e2887f59532e59e626b03ef6 29-May-2012 Alexey Samsonov <samsonov@google.com> Make Clang driver pass the last option from -g group to the compiler.
Leave a better fixme for different debug info flags

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157602 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f0fab767c8c272fc77699e82fd581ddf4d9d71fa 23-May-2012 Chad Rosier <mcrosier@apple.com> [driver] Have the crash diagnostics print the clang version information.
rdar://11518308


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157346 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d6277fb9e0353edffc0d6c8655a65542c08cf6f1 21-May-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [driver] When creating the compiler invocation out of command-line
arguments, force use of clang frontend for the driver.

Fixes rdar://11356765.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157205 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
d26db2f595ee008719856fff3622357d6e41e9ef 21-May-2012 Peter Collingbourne <peter@pcc.me.uk> Tell the driver that CUDA is a C++-like language, so that we get C++
header searches with CUDA.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@157172 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
189373170330e3d551bdb28c9762d606f3bcb931 17-May-2012 Chad Rosier <mcrosier@apple.com> [driver] Remove obsolete support for -A link option. The standard -A option is
used by the preprocessor. Apple's GCC also supported a -A option for linking.

The ld man page has the following:
-A basefile - Obsolete incremental load format. This option is obsolete.

Nick Kledzik confirms this option is no longer needed/supported.
rdar://11455614

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156965 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
005af27c607536038864ff36d480b5ecd066a267 16-May-2012 Chad Rosier <mcrosier@apple.com> Rename the driver option to -mno-implicit-float, per Eli's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156950 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
832a2aac5766dd78f113e0f03a0c62fd0eacbc97 16-May-2012 Manuel Klimek <klimek@google.com> Pulls diagnostics for temp file handling into the common diagnostic kinds.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156947 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ee9ad5ce4840b3c95024948c89d00945ffdda9bb 16-May-2012 Chad Rosier <mcrosier@apple.com> [driver] Allow the driver to directly accept the -no-implicit-float option, so that the
generation of implicit floating point instructions can be disable for ARM.
rdar://11409142


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156942 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f7efb0e7478da45bc7f2d24dbeb08406d2399591 16-May-2012 Kostya Serebryany <kcc@google.com> [tsan] add ThreadSanitizer linker flags on Linux and also copy the tsan-rt into the appropriate place at build time

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156906 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
04e326b3d0ae1a84643b7366ce0ea5137e06ed69 15-May-2012 Douglas Gregor <dgregor@apple.com> Add the Objective-C runtime linking arguments after user-specified
linker arguments. Fixes <rdar://problem/11417441>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156853 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
63d9f3cddee40a3f3e5579e9004b31ec8663b5d9 15-May-2012 Bob Wilson <bob.wilson@apple.com> Do not link with Objective-C libraries with -nostdlib or -nodefaultlibs.
<rdar://problem/11433499>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156841 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
91720917d4ea35af0f9f15eeebf0daf709c41e98 15-May-2012 Gabor Greif <ggreif@gmail.com> add embedded linux variants that occur in the field

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156813 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2ba542c741c39691940f5d1de0bc88c22f46c430 14-May-2012 Chandler Carruth <chandlerc@gmail.com> Teach the driver on Linux to respect -nodefaultlibs.

Patch from Andrew C. Morrow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156771 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5f9688b7c7fdeafdf530056d49f82d2ec6ca457f 10-May-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 FP support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156567 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
49033207b75216a956f3dbf7d018fb3343a54ec1 09-May-2012 Chad Rosier <mcrosier@apple.com> Roll logic into a single if statement, per David's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156502 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8c990274ae17cf7c56048ee453b0566515633b7f 09-May-2012 Chad Rosier <mcrosier@apple.com> Use the triple directly, rather then getTriple().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156501 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c793ea42d7afd567c3cdd900cfa72398b2b38cd5 09-May-2012 Chad Rosier <mcrosier@apple.com> Now the proper fix for r156497. Sorry for the churn.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156498 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4ec2678021a4621228321958b3641540f27a834a 09-May-2012 Chad Rosier <mcrosier@apple.com> Move the iOSVersionMin string to a header so as to avoid a dangling pointer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156497 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
87ca5580302561c839b2cd12207902b9bf4ed117 09-May-2012 Chad Rosier <mcrosier@apple.com> [driver] Use the iOS target triple to infer the deployment target.
rdar://11409204


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156489 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e0cc309536817cc5701c5a26119c8eeb7080057c 09-May-2012 Bob Wilson <bob.wilson@apple.com> Ignore a "generic" return value from getHostCPUName. <rdar://problem/11314502>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
8775485350b2419cb9953518ace61cf68b1c9c18 04-May-2012 Chad Rosier <mcrosier@apple.com> StringRefize code because we're good even when we crash.
Patch by Jordy Rose.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156172 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2e4fd6d9a1c8ba9c400324d230cfc49050550dea 04-May-2012 Jean-Daniel Dupas <devlists@shadowlab.org> Fix -Wlarge-by-value-copy option handling in the driver.
CC1 supports only the joined format.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156161 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
8c4b4d3c294a152b6f7f1f9a7155985f2a29a730 04-May-2012 Bob Wilson <bob.wilson@apple.com> Remove obsolete code for finding a fallback iOS SDK. <rdar://problem/11378535>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156149 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
44727629b766bf34bc2299c40f5ee8e4c7a71391 04-May-2012 Chad Rosier <mcrosier@apple.com> [driver - crash diagnostics] Convert the flags back to an array of strings and use
array_lengthof. Also, append the new filename with correct preprocessed suffix.
Last part of rdar://11285725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156117 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f9e156c774e08409f235f0e9c9e3133ec796e877 03-May-2012 Chad Rosier <mcrosier@apple.com> Use array_lengthof instead of sizeof trickery.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156104 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
53d2409a223a14d063faf06e4360ede09c41ed80 03-May-2012 Chad Rosier <mcrosier@apple.com> [driver - crash diagnostics] Only write the failing command in the script.
Part of rdar://11285725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156096 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c476e924d69a3438489f92575670ab6d64ed06c4 03-May-2012 Chad Rosier <mcrosier@apple.com> Canonicalize loop.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156093 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
d83217cbfcfcde7b21a829483347e593e2f2a4a3 03-May-2012 Chad Rosier <mcrosier@apple.com> [driver crash diagnostics] Remove more flags that reference absolute paths that
aren't necessary to reproduce the clang crash.
Part of rdar://11285725


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156079 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4206c27768e15865f936a9bdb8ea082087118b78 03-May-2012 Bob Wilson <bob.wilson@apple.com> Rip out old code for finding libraries in GCC's directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156058 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
769aa2d46fa5dc0bee5285c95a80ad8749cb79cf 02-May-2012 Benjamin Kramer <benny.kra@googlemail.com> Driver: Turn the default value for -fmath-errno into a proper target hook and disable it by default on more platforms.

For now -fno-math-errno is the default on BSD-derived platforms (Darwin,
DragonFlyBSD, FreeBSD, NetBSD, OpenBSD). If the default is not right for
your platform, please yell. I only verified the result with the default
compilers on Darwin and FreeBSD.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155990 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
8049c44d972fc7266b4369e8960875c118c067e0 02-May-2012 James Molloy <james.molloy@arm.com> Fix forwarding of -fpack-struct from driver to CC1, and add a test.

-fpack-struct's handling has changed in CC1 (one of only two flags that needed changing) because the driver treats "-fpack-struct" as a boolean flag, and CC1 (did) treat it as an option with a separated value.

This change causes -fpack-struct=X to be forwarded correctly to -fpack-struct=X instead of erroneously to "-fpack-struct X"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155981 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
168d31781841ef216f50489decaf7ac6907ca7df 02-May-2012 Andrew Trick <atrick@apple.com> Speculatively fix windows cmake builders.

Really just a wild stab in the dark.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155974 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
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
C1Options.cpp
MakeLists.txt
river.cpp
ptTable.cpp
4e1b292146936432dd6c76ba413f700eb1cd3432 01-May-2012 Douglas Gregor <dgregor@apple.com> Add support for openSUSE 12.2, from Ismail Donmez!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155860 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8202fb8ee3c86797f737413de6030a88c8e0781c 27-Apr-2012 Chad Rosier <mcrosier@apple.com> [driver] Don't try to set the deployment target when there is no bound
architecture; this was happening for tools such as lipo and dsymutil.
Also, if no -arch option has been specified, set the architecture based
on the TC default.
rdar://11329656


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155730 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
4e47dee72a19fbc4db256361f0e4056992551c53 27-Apr-2012 Chad Rosier <mcrosier@apple.com> Fix logic such that we only call getToolChain once. No functional change
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155719 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1dcfe3412519cf6ffe65644d4d72ca1b4160d312 27-Apr-2012 Chad Rosier <mcrosier@apple.com> Remove redundant calls to BAA->getArchName(). No functional change
intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155718 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c97e96a61fca41e84d5af3027b91cc1db32f1654 27-Apr-2012 Chad Rosier <mcrosier@apple.com> Revert 155679; Not a typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155708 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e9a4c01978f505f1fd23e63d18230d30ebe29ed0 27-Apr-2012 Chad Rosier <mcrosier@apple.com> Typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155679 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b8c4381ae046e7dea389567595b1df66e9553b18 26-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Add support for 64-bit MIPS targets: mips64 / mips64el.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155656 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4f50c50e783461ea1ec47dd6fe9be10aafcd76ad 26-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Fix a long-standing bug where Clang had a different default from GCC on
Linux and other (non-Darwin) platforms and have it use -fmath-errno by
default (for better or worse).

Darwin has seen the light here and uses -fno-math-errno by default, this
patch preserves that.

If any maintainers for a non-Linux platform would also like to opt-in to
-fno-math-errno by default, I'm happy to add folks, but we're currently
getting buts and misleading comparisons with GCC due to this difference
in behavior on Linux at least.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155607 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a6ddc02921d47d0a1dc9ffe4d31438f250751e05 25-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Clang driver support for linking on Android.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155541 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4add84f83f4505304ab3f94ebfa6bbc0be60058d 25-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix default cpu for -march=armv5e.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155540 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fa784da5b9039ead42323bfe9ae6d33ab3c5c6b3 24-Apr-2012 Shih-wei Liao <sliao@google.com> Merge with CLANG upstream r155088.

Conflicts:
lib/Basic/Targets.cpp

Change-Id: Id80f069ae25e623967b705e9fa11cfd94dd2461c
eca187e9f20886f20bb0ea78b4f4b87a18a96b8c 24-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Only pass -mcpu, -march, -mfpu to linux-as on ARM.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155431 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6603ff85d415c2aa72579f1a247012b75bfc2a19 23-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert r155363, due to the underlying patches in LLVM causing regression
test suite failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155371 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ac28eca18a9f0a343c78ba90b02dfe52302c1f19 23-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5 (floating point) support in cfe.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155363 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0b1c7156844f1e0e37766a64879b1d1d77fc5385 21-Apr-2012 Bob Wilson <bob.wilson@apple.com> Link with Foundation whenever -fobjc-link-runtime is used. <rdar://10976177>

The check for excluding libarclite on i386 MacOSX should not apply to
Foundation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155263 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
61ada0a7a8e743a50f5f8305e2e49d4447212a69 20-Apr-2012 Chad Rosier <mcrosier@apple.com> In r135308, -save-temps was modified to prevent a temporary file from
overwriting the input file. For example,

clang -c foo.s -o foo.o -save-temps

Unfortunately, the original patch didn't compare the paths of the input and
output files. Thus, something like the following would fail to create foo.s.

cd /tmp/obj
clang -c ../src/foo.s -o foo.o -save-temps

rdar://11252615


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155224 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d2fb88300966b1bb5ade07b7574f34aa54c0a97a 20-Apr-2012 Chad Rosier <mcrosier@apple.com> When generating the clang crash diagnostic script, strip out the -o flag.
Add a FIXME comment.
rdar://11283560


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155207 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
80ec127fc9af8b83eea326fbd65265a1adc307d8 20-Apr-2012 Chad Rosier <mcrosier@apple.com> Add a little hack to emulate a clang crash, so the diagnostics generator can be
tested.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155205 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
700c508fd469a971480c36d54ae12fe9011f27c0 20-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Pass -mfloat-abi= to linuxtools assembler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155191 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cc66b08945099b734b05d06179ea85413c69753d 20-Apr-2012 Chad Rosier <mcrosier@apple.com> When generating the clang crash diagnostic script, strip out the -D, -F, and -I
flags. We have preprocessed source, so we don't need these.

No test case as it's fairly difficult to make the compiler crash on demand. I'll
patiently wait for Ben to tell me how to do this in 2 lines of code. :)
rdar://11283560


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155180 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
103f41d0e72a9e52a07e19cbde58c3afc8735098 18-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Revert some Hexagon builtin commits to match reverts done to LLVM in
r155047. See the LLVM log for the primary motivation:
http://llvm.org/viewvc/llvm-project?rev=155047&view=rev

Primary commit r154828:
- Several issues were raised in review, and fixed in subsequent
commits.
- Follow-up commits also reverted, and which should be folded into the
original before reposting:
- r154837: Re-add the 'undef BUILTIN' thing to fix the build.
- r154928: Fix build warnings, re-add (and correct) header and
license
- r154937: Typo fix.

Please resubmit this patch with the relevant LLVM resubmission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155048 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
241cbe488c6f48e489915e256f532e22273d1eba 18-Apr-2012 Gabor Greif <ggreif@gmail.com> fix GCC version comparison wrt. equal patch suffices (and squash two typos)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154997 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0407a04049016bdd6fe4fda462aa199d82c750d4 17-Apr-2012 Gabor Greif <ggreif@gmail.com> fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154920 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7ac715fd3118362f14574c312b044d22e3afeee9 16-Apr-2012 Sirish Pande <spande@codeaurora.org> Hexagon V5(Floating Point) support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154828 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4762a2da74875d2ae94e0d77d38ed964816cce36 16-Apr-2012 Sebastian Pop <spop@codeaurora.org> use DEFAULT_SYSROOT

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154792 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
ools.cpp
6c22939938d9596af43ebd456f68f8e49b42500a 15-Apr-2012 David Blaikie <dblaikie@gmail.com> Correct indentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154774 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e58e6f9114e61f0e490b5dc1c4f20b23a30f12dc 10-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Don't link lib[std]c++ when -nostdlib is specified (Solaris driver).

Patch by Dmitri Shubin!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154392 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e9b4d98f97de6657d4ff77478ba69730f08b9b81 10-Apr-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Pass -march, -mcpu, -mfpu to linuxtools assembler.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154389 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c5151543236bd213b8595a079cf9b1d26de4eeb1 10-Apr-2012 Rafael Espindola <rafael.espindola@gmail.com> Fix an annoying little bug I found while debugging another LTO issue. Gold
requires the -plugin to come before any -plugin-opt options, we were passing
them the other way around. With this one can run (for example):

clang -o foo foo.c -O4 -Wl,-plugin-opt=generate-api-file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154357 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e51fe0972a781e79abae550786ebed7d1da54252 09-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: remove -fobjc-default-synthesize-properties from the driver.
cc1 option remains though to invoke default property synthesis.
// rdar://11209719


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154334 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e52e2e6f4840c2fa8f7e6289cab976e2c8d2fdc0 09-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> objective-c: Remove -fno-objc-default-synthesize-properties
as the driver option.
// rdar://11209719


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154331 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.cpp
e2571793ba6fc13e5525b8d7224812f99842a1a4 09-Apr-2012 Anton Korobeynikov <asl@math.spbu.ru> Factor out ARM floating ABI determination to new routine


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154318 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c3cb07205a18d51b0cfff5d431579d5930277ee0 09-Apr-2012 David Chisnall <csdavec@swan.ac.uk> Make a modern Objective-C runtime the default target for *BSD. Don't yet change this on GNU/Linux, where the GCC runtime still tends to be used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154315 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
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
ools.cpp
073a780f7cb863cd382d1c966ef11d05c6fad075 08-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Pass -mabi option to the assmbler when compile MIPS targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154270 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a2768be144256f9eb721bef8b751e56e0b64fa0b 08-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Move code calculates CPU and ABI names to the separate function to reuse this function later.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154269 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a53ab5c569f494e44344ab950ccd6289dfa2d3ef 07-Apr-2012 Chad Rosier <mcrosier@apple.com> [driver] In general, the driver claims redundant args and uses the last arg.
However, the '-x' option has special handling and wasn't following this
paradigm. Fix it to do so by claiming the arg as we parse the '-x' option.
rdar://11203340


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154231 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8491cb245f7fccfb049f860444467130f68189d3 06-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Provide a correct path to the dynamic linker when build for MIPS 64-bit targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154200 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5f0a1c12dacadd5a061ea5b57d51cf6798ae22a1 06-Apr-2012 Simon Atanasyan <satanasyan@mips.com> MIPS: Pass -EB/-EL argument to the assembler according to selected endian when compile for MIPS targets.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154195 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9f314374672a9c50d45ab60b96718cfbab06f484 06-Apr-2012 Chandler Carruth <chandlerc@gmail.com> Fix using Clang as a cross compiler installed on a host machine and not
inside of a sysroot targeting a system+sysroot which is "similar" or
"compatible" with the host system. This shows up when trying to build
system images on largely compatible hardware as-if fully cross compiled.

The problem is that previously we *perfectly* mimiced GCC here, and it
turns out GCC has a bug that no one has really stumbled across. GCC will
try to look in thy system prefix ('/usr/local' f.ex.) into which it is
instaled to find libraries installed along side GCC that should be
preferred to the base system libraries ('/usr' f.ex.). This seems not
unreasonable, but it has a very unfortunate consequence when combined
with a '--sysroot' which does *not* contain the GCC installation we're
using to complete the toolchain. That results in some of the host
system's library directories being searched during the link.

Now, it so happens that most folks doing stuff like this use
'--with-sysroot' and '--disable-multilib' when configuring GCC. Even
better, they're usually not cross-compiling to a target that is similar
to the host. As a result, searching the host for libraries doesn't
really matter -- most of the time weird directories get appended that
don't exist (no arm triple lib directory, etc). Even if you're
cross-compiling from 32-bit to 64-bit x86 or vice-versa, disabling
multilib makes it less likely that you'll actually find viable libraries
on the host. But that's just luck. We shouldn't rely on this, and this
patch disables looking in the system prefix containing the GCC
installation if that system prefix is *outside* of the sysroot. For
empty sysroots, this has no effect. Similarly, when using the GCC
*inside* of the sysroot, we still track wherever it is installed within
the sysroot and look there for libraries. But now we can use a cross
compiler GCC installation outside the system root, and only look for the
crtbegin.o in the GCC installation, and look for all the other libraries
inside the system root.

This should fix PR12478, allowing Clang to be used when building
a ChromiumOS image without polluting the image with libraries from the
host system.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154176 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3953911de1e81aec780c00102b39a2bfac8f4734 05-Apr-2012 Nico Weber <nicolasweber@gmx.de> Honor -fno-pic, -fno-PIC, -fno-pie, -fno-PIE.

Review at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055759.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154064 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
30fe6baf95662ea82a794a8fe3b76998713c183d 05-Apr-2012 Chad Rosier <mcrosier@apple.com> [driver] When using the -mfpmath= option, add an error message when trying to
enable neonfp on a CPU that doesn't support NEON.
rdar://11108618


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
12093861bb0dd68f7a65c41929293275fed4f245 04-Apr-2012 Simon Atanasyan <satanasyan@mips.com> Test commit to check commit access.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154056 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f80f2a5098218211704bc4e66a8c2f46a8fa1d25 04-Apr-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154050 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
993172757762436d22b2dfc74e7cca1bade1a7bf 04-Apr-2012 Chad Rosier <mcrosier@apple.com> [driver] Add a static helper function for handling -mfpu= to remove some code
duplication. No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154049 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d624a5b43a970bd3102d7075baeea89b8ca336a4 04-Apr-2012 David Blaikie <dblaikie@gmail.com> Reduce variable scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154047 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7a938fa66be42710b034a79106de337a275fd265 04-Apr-2012 Chad Rosier <mcrosier@apple.com> [driver] Create a new -mfpmath= option, which is used to control whether clang
uses Neon instructions for single-precision FP.

-mfpmath=neon is analogous to passing llc -mattr=+neonfp.
-mfpmath=[vfp|vfp2|vfp3|vfp4] is analogous to passing llc -mattr=-neonfp.

rdar://11108618


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154046 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e982cc0ea3e9255b8aacf8f0bff559e9b1cfd72e 04-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> modern objc translator. Add more
rewriter specific option to cc1 with -rewrite-objc.
// rdar://11143173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154037 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
15b77319d0ce4332275992b2f191898a1df50efe 04-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> Remove unused argument.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154035 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
582b395ea4d5dfe353e2132a470d39efe2f84a54 02-Apr-2012 Fariborz Jahanian <fjahanian@apple.com> Use -rewrite-legacy-objc as clang argument for translating
objective-c's fragile abi, Use -rewrite-objc for translating
objective-c's modern abi. // rdar://11143173


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153877 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ypes.cpp
651f3d44dbae18c74c5f475d7a601d65b07b45c4 02-Apr-2012 Bob Wilson <bob.wilson@apple.com> Ignore unused --serialize-diagnostics option when using llvm-gcc.

llvm-gcc doesn't handle --serialize-diagnostics so when compiling i386
kernel/kext code with -Werror, you get an error about that option being
unused. Claim the argument to prevent this from breaking builds.
<rdar://problem/11161933>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153854 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6903313102c4e1ca598305850cc209b62711b1b6 29-Mar-2012 Jim Grosbach <grosbach@apple.com> ARM backend knows about cortex-m4. The front end should too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153678 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.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
ools.cpp
afc4baa37c2f38fadf05b15456b10a0994d51b0b 27-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] Fix unused argument warnings.

1. Don't short-circuit conditional statements that are checking flags.
Otherwise, the driver emits warnings about unused arguments.

2. -mkernel and -fapple-kext imply no exceptions, so claim exception related
arguments now to avoid warnings about unused arguments.

rdar://11120518


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153478 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ec09b3e0c5d96a1b7a3e797cdff2875eca1e9907 26-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] -mkernel implies -fno-common, so claim the arg to avoid an unused
argument warning.
Part of rdar://11120518


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153470 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3d26550ba88d2c15292b3f290d6eadec83749e95 26-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] -mkernel implies -fno-builtin, so claim the arg to avoid an unused
argument warning.
Part of rdar://11120518


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d316862f4fb281ec08a2e45cd3e5580574adb889 24-Mar-2012 Shih-wei Liao <sliao@google.com> Merge branch 'upstream' into sliao_d
ad8d8a31b010ceac4cad2553f16fc1a77c4b2e5e 24-Mar-2012 Akira Hatanaka <ahatanaka@mips.com> Add support for MIPS' floating ABIs (hard, soft and single) to clang driver.

Patch by Simon Atanasyan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153348 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
57f6d1946b1026eb4d0bbc1904b2833b254d4caa 21-Mar-2012 Bob Wilson <bob.wilson@apple.com> Duplicated code is bad. At least make it consistent.

The getARMTargetCPU and getLLVMArchSuffixForARM functions exist in both
Toolchain.cpp and Tools.cpp. This stuff needs a thorough overhaul. In the
meantime, this patch at least makes them consistent. One version had been
converted to use StringSwitch, and the other version had new Cortex M-series
processors added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153202 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
677a35b628c8a9f0cef9277dbb78e6e8509d13e4 21-Mar-2012 Bob Wilson <bob.wilson@apple.com> For Darwin, do not let -mcpu override the -arch option. <rdar://11059238>

On Darwin the architecture and the corresponding Mach-O slice is typically
specified with -arch. If not, it defaults to the current host architecture.
Do not use -mcpu to override the -arch value. This is only an issue when
people need to use specialized code for a non-default CPU (hopefully guarded
by run-time checks to detect the current processor). The -mcpu option is
still used for the -target-cpu option to clang, but this patch causes it to
not be used to set the architecture in the target triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153197 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
09c5c39590caa92aa7ce660607a070ea275f5ad7 19-Mar-2012 Nico Weber <nicolasweber@gmx.de> Fix a regression where ':' in CPLUS_INCLUDE_PATH and friends would no longer separate paths.

This regressed in r152583. Also add a test to make sure it doesn't regress again.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153034 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
95187bdd5c955c8edf3527eae41f1e4f80377f27 15-Mar-2012 David Blaikie <dblaikie@gmail.com> Reapply r152745 (reverted in 152765) now that compiler-rt is fixed.

Original commit message:

Provide -Wnull-conversion separately from -Wconversion.

Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.

Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152774 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9ca33fd56720112bcc4bccb8aa6107abbb68cae3 15-Mar-2012 Chad Rosier <mcrosier@apple.com> Revert r152745 as it's breaking the internal buildbots.

Abbreviated commit message:
Provide -Wnull-conversion separately from -Wconversion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152765 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
47bfaf19ddc980a9eb48f2978f4da9b7861b9cda 14-Mar-2012 David Blaikie <dblaikie@gmail.com> Provide -Wnull-conversion separately from -Wconversion.

Like GCC, provide a NULL conversion to non-pointer conversion as a separate
flag, on by default. GCC's flag is "conversion-null" which we provide for
cross compatibility, but in the interests of consistency (with
-Wint-conversion, -Wbool-conversion, etc) the canonical Clang flag is called
-Wnull-conversion.

Patch by Lubos Lunak.
Review feedback by myself, Chandler Carruth, and Chad Rosier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152745 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4574c3d75edb0a496d36246b760094f3acf1ba27 14-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] Clang should report an error for -faltivec on non-ppc.
rdar://10963572


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152684 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
rgList.cpp
e6dd683d99b14ff8cd886cd81e6588cd1883ca52 13-Mar-2012 David Chisnall <csdavec@swan.ac.uk> Tweak linkage order for solaris.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152627 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ce6d214aef65ea1421eb11e84980dfa4da429b8 13-Mar-2012 NAKAMURA Takumi <geek4civic@gmail.com> [msvc] Honor %INCLUDE%. It should know essential search paths with vcvarsall.bat.

FYI,

On VS10, %INCLUDE% contains;
(VS10)\VC\INCLUDE
(VS10)\VC\ATLMFC\INCLUDE
(SDK70A)\include

On VS11,
(VS11)\VC\INCLUDE
(VS11)\VC\ATLMFC\INCLUDE
(SDK80)\include\shared
(SDK80)\include\um
(SDK80)\include\winrt

FIXME: It may be enabled also on mingw.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152589 91177308-0d34-0410-b5e6-96231b3b80d8
indowsToolChain.cpp
3d7171582b026e043916fc5d65a7d7aada547206 12-Mar-2012 Bill Wendling <isanbard@gmail.com> Address some of the concerns by Chandler.

* s/AddDirectoryList/addDirectoryList/
* Move the call to ::getenv into the function.
* FileCheck-ize the testcase.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152583 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e8cb554c36c94e31e80ea893d9ad528afb491bdf 12-Mar-2012 Bill Wendling <isanbard@gmail.com> Update FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152579 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
bdb8f3ce95e3e5c43497292fd05764faa6ad46b1 12-Mar-2012 Bill Wendling <isanbard@gmail.com> Have clang pay attention to the LIBRARY_PATH environment variable.

The LIBRARY_PATH environment variable should be honored by clang. Have the
driver pass the directories to the linker.
<rdar://problem/9743567> and PR10296.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152578 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
09c9a5635f10a7dfa3373ef0941597c16b048362 10-Mar-2012 Benjamin Kramer <benny.kra@googlemail.com> Use VersionTuple to manage macosx versions in the driver. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152504 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
df423545a19275559b675bb4f20b6fbe738f0a11 09-Mar-2012 Nico Weber <nicolasweber@gmx.de> Update comment after r152140. Clarify a bit too.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152441 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
701ec8d11039fd0c571312253e6b15f22f29c592 08-Mar-2012 Rafael Espindola <rafael.espindola@gmail.com> Implement -fno-dwarf2-cfi-asm on linux too.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152316 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ba9a6244c56b19bc2a24de5d0c32ff37d50177b 07-Mar-2012 Chad Rosier <mcrosier@apple.com> [driver] Don't try to generate diagnostic information for linker crashes.
rdar://10993648



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152180 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.h
53cb2b47596b0ca893a449fa81e0912ded658759 07-Mar-2012 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152159 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.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
ction.cpp
river.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
indowsToolChain.cpp
2a253960f0312c9759965a1defb9326d6b2764a4 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Enable default @synthesize by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152140 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ebcb57a8d298862c65043e88b2429591ab3c58d3 06-Mar-2012 Ted Kremenek <kremenek@apple.com> Add clang support for new Objective-C literal syntax for NSDictionary, NSArray,
NSNumber, and boolean literals. This includes both Sema and Codegen support.
Included is also support for new Objective-C container subscripting.

My apologies for the large patch. It was very difficult to break apart.
The patch introduces changes to the driver as well to cause clang to link
in additional runtime support when needed to support the new language features.

Docs are forthcoming to document the implementation and behavior of these features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152137 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.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
ools.cpp
361035524dc26094825134f30c07311f38f4f8b1 06-Mar-2012 Stephen Hines <srhines@google.com> Merge with upstream Clang @152062.

Added include/clang/Config/config.h
(note the ANDROID_CONFIG_H header guard because CONFIG_H is already taken)

Added support for AttrTemplateInstantiate TableGen rules.

Added libLLVMVectorize dependency.

Build
-HostInfo.cpp
-CallGraph.cpp
+GlobalCallGraph.cpp
-MultiInitializer.cpp
+PPCallbacks.cpp
+SemaConsumer.cpp
+ChainedDiagnosticConsumer.cpp
+DependencyGraph.cpp
+DiagnosticRenderer.cpp
+LayoutOverrideSource.cpp
+WindowsToolChain.cpp
+SemaLambda.cpp
+BoolAssignmentChecker.cpp
+LambdaMangleContext.cpp
+CStringSyntaxChecker.cpp
+ObjCContainersASTChecker.cpp
+ObjCContainersChecker.cpp
+VirtualCallChecker.cpp
+Dominators.cpp
+SubEngine.cpp
+RewriteModernObjC.cpp

Change-Id: Ifda805ce87ae132f055131f4f83692b5c3d63d17
ndroid.mk
91932089c31e1233f0c478b03412e90a65e07ad2 05-Mar-2012 Stephen Hines <srhines@google.com> Merge branch 'upstream' into merge-20120305

Conflicts:
lib/Basic/Targets.cpp

Change-Id: Ib76c138030a701355ce39a6eda1a89a79f401667
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
ools.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
ools.cpp
41d476d307973cefddeee5661b0573a2cf1b0f24 29-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Add -C when linking on Solaris so that the error messages are understandable by actual humans.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151726 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5840dd9a09c458ef894e7d47caab1d90dc4c1112 29-Feb-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> [driver] Emit an error when trying to use ARC on macosx earlier than 10.6

rdar://10459258

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151706 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
7dbefe1b1ffbe1d69cc94d07368065976baa49a1 28-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Add -lm by default on Solaris.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151653 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d706a8d118727ace6c12051037f1b0e2bd2aed60 28-Feb-2012 David Chisnall <csdavec@swan.ac.uk> It turns out -fno-cxa-atexit just produces broken code, so disable it on Solaris and we'll ship a __cxa_atexit implementation...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151648 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
165329c1d134d000904d6e08b1d166bf34e05517 28-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Some more Solaris fixes. Now successfully building libc++ on Solaris with clang (and linking clang against it).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151632 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
033d3007b16d7f6c0f0eafd06c7096cfd22d89f5 28-Feb-2012 Jim Grosbach <grosbach@apple.com> Re-enable the Darwin ARM integrated assembler.

All known nightly-test failures are fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151595 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
079d2bbec5c14cfa5901aa579c6934f34484fc97 26-Feb-2012 Chandler Carruth <chandlerc@gmail.com> A follow-up to r151482 which added support for powerpc and powerpc64
Debian multiarch libraries, this should in theory add support for those
platform's header search rules. I don't have a system to check this
with, so review appreciated. I've added the corresponding tests
referring to the debian multiarch tree.

We are starting to have a relatively completely tested Linux platform
for header search and library search, with several interesting
peculiarities. We should point people at the debian_multiarch_tree when
suggesting new tests. Folks with Debian systems that can check this for
correctness, it would be much appreciated. The missing chunks I know of
are testing bi-arch peudo-cross-compiling toolchains betwen 32-bit and
64-bit variants of platforms, and the MIPS and ARM Debian toolchains.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151484 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
155c54c011ecc2ffdaf7759ec5dbbafafff40618 26-Feb-2012 Chandler Carruth <chandlerc@gmail.com> Add support for PPC and PPC64 multiarch toolchains on Debain.

Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added
64-bit support. I just added one other place where powerpc64-linux-gnu
was missing (we only had powerpc64-unknown-linux-gnu).

I've also added a tree to test out the debian multiarch stuff. I don't
use debian regularly, so I'm not certain this is entirely accurate. If
anyone wants to check it against a debian system and fix any
inaccuracies, fire away. This way at least folks can see how this is
*supposed* to be tested.

It'd be particularly good to get the Debian MIPS toolchains tested in
this way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151482 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f1868793bfb3ffcb6f569cf362f7c5db1f52525c 25-Feb-2012 Chad Rosier <mcrosier@apple.com> Temporarily revert r151288:
ARM: enable the integrated assembler by default for Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151454 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
d649586a10465b3e8f7e38ef0a428daf7464aa49 23-Feb-2012 Jim Grosbach <grosbach@apple.com> ARM: enable the integrated assembler by default for Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151288 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
8a988c32b8ac18eb252ef4a58ed56f898255524d 22-Feb-2012 Joerg Sonnenberger <joerg@bec.de> Revert part of r148839 and keep DefaultTargetTriple in the form adjusted
by -target and similar options. As discussed in PR 12026, the change
broke support for target-prefixed tools, i.e. calling x86_64--linux-ld
when compiling for x86_64--linux. Improve the test cases added
originally in r149083 to not require execution, just executable files.
Document the hack with appropiate FIXME comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151185 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2dd17a15ddc0184790d790b6128d79ffddae4964 22-Feb-2012 Chad Rosier <mcrosier@apple.com> [driver] Add a warning for when -mcpu= is specified without an argument. There
are likely many other OPT_xxxx_EQ options that could/should be added here.
rdar://10704648



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151174 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2639ac628cff5dedb4fa60169082b2a1a9dd8694 22-Feb-2012 Chad Rosier <mcrosier@apple.com> Provide a way to disable auto-generation of preprocessed files during clang
crash. This can speedup the process of generating a delta reduced test case.
rdar://10905465


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151109 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1367c9b0ff3f657d2f2d471365a69e8f6d2ccbd0 20-Feb-2012 Aaron Ballman <aaron@aaronballman.com> Fixing the working-directory option so that it stores the proper directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150960 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0e65959196b45d8afc89e9102c4fc4ec0d642066 19-Feb-2012 Rafael Espindola <rafael.espindola@gmail.com> Implement a -gcc-toolchain command line option that does the same as
configure's --with-gcc-toolchain. The configure option is now just a default
value for the command line one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150898 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
b8197bcdd7453ef85d282b0e5141761f4bd83b64 18-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Default to not using __cxa_atexit on Solaris.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150883 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d1ac03ebac3ab5a8456b955e3f8634f786843f9a 16-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Tweak link order on Solaris so that global ctors work.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150696 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
b622959527c07cc6b68739eac1412f75f0ca77fa 15-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Add some Solaris include paths and fix a -lgcc_eh that apparently should be -lgcc_s.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150602 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
badb6cd2007825308208e6c4275ba54e220e4e28 15-Feb-2012 David Chisnall <csdavec@swan.ac.uk> Fix copy-and-paste error in comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150587 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
31c4690047f5f362ecf886f1586844b1aef0c4d2 15-Feb-2012 David Chisnall <csdavec@swan.ac.uk> First pass at Solaris toolchain support. This version compiles and links hello
world on Solaris 11 for both x86 and x86-64 using the built-in assembler and
Solaris (not GNU) ld, however it currently relies on a hard-coded GCC location
to find crtbegin.o and crtend.o, as well as libgcc and libgcc_eh.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150580 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
cc8a94565ec2ff459dcee9ef34237fdcdfc69b3f 14-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> include clang's config.h unconditionally (v2)

And remove HAVE_CLANG_CONFIG_H, now that the header is generated
in the autoconf build, too.

Reverts r149571/restores r149504, now that config.h is generated
correctly by LLVM's configure in all build configurations.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150487 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
c56389189e7a8b99d7db3a6f60c896adb2b092bf 13-Feb-2012 Chad Rosier <mcrosier@apple.com> When generating diagnostic information due to a clang failure, allow multiple
-arch options if the're all the same.

Patch by Jeremy Huddleston.
rdar://10849701

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150403 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9b338a7bca39a68ae9f8c57d9210f19f7e45b665 13-Feb-2012 Chandler Carruth <chandlerc@gmail.com> Delete a simplistic helper function now that llvm::Triple can provide
this functionality.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150358 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d747efaad80117799ff7e2ab10608f18ee1348c1 11-Feb-2012 Chandler Carruth <chandlerc@gmail.com> Begin refactoring to use the newly added triple predicates for
simplicity. Also addresses a FIXME, although not one that could be
observed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150294 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
fc30829694e62040c14f329f5491724fe7476241 10-Feb-2012 Jim Grosbach <grosbach@apple.com> Have the driver pass CPU and target feature information to cc1as.

When creating the MCSubtargetInfo, the assembler driver uses the CPU and
feature string to construct a more accurate model of what instructions
are and are not legal.

rdar://10840476


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150273 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
b9da55780eb66fb09e771dbc5ff01eec5c4d957b 09-Feb-2012 David Blaikie <dblaikie@gmail.com> Correct comment Clang C++ use in production.

This was from way-back-when (r82583) when Clang's C++ support wasn't prime-time
yet. Production quality C++ was tested experimentally from r100119 and turned
on by default in r141063.

Patch by Justin Bogner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150148 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2872c8d5465623c1207b17873f228f5d96038d5e 07-Feb-2012 Bob Wilson <bob.wilson@apple.com> Filter a few more options not recognized by gcc. <rdar://problem/10814020>

These are new options that gcc doesn't recognize so the clang driver needs
to remove them when it falls back to invoking gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149951 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b822f72c708e235a135fcaf9eb1dba8c20c6a680 06-Feb-2012 Eric Christopher <echristo@apple.com> Rewrite the debug action handling to take -verify into account.
Add a quiet option for dwarfdump and move it out of NDEBUG only.
Still requires an option as we don't want this on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149894 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
1c79dc4086a5fc754689ace567cb7418ed022fcc 06-Feb-2012 Eric Christopher <echristo@apple.com> Update the command line here and update the comment, we're just going
to leave this as a debug only option for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149890 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
afe55fbc10bb1f15f0f6b9d34c88d3a86475c8c9 06-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> - Turn the other distribution checks into range compares.
- Turn openSUSE version parsing into a StringSwitch
- Add an entry for Fedora release 16 (Verne)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149872 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
668ecd9c8d428bdb2cd3566c8caf83b870609b4a 06-Feb-2012 Benjamin Kramer <benny.kra@googlemail.com> Consolidate the ubuntu detection logic a bit, add an entry for Ubuntu 12.04 aka precise pangolin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149869 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f7ccbad5d9949e7ddd1cbef43d482553b811e026 05-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> Basic: import SmallString<> into clang namespace

(I was going to fix the TODO about DenseMap too, but
that would break self-host right now. See PR11922.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149799 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
river.cpp
oolChains.cpp
ools.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
river.cpp
oolChains.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
ools.cpp
353300c4af020ce5d8368d1c336cbf7583c33a7d 03-Feb-2012 Rafael Espindola <rafael.espindola@gmail.com> Replace the old --with-cxx-* configure options with a single --with-gcc-toolchain
that just uses the new toolchain probing logic. This fixes linking with -m32 on
64 bit systems (the /32 dir was not being added to the search).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149652 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f2462be34a49e2108c9b4151f8e6d3fe1b916179 02-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> back out r149504

Too many weird build failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149571 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
69d3b4f7c9fa818d2536b4f1b220b942ae392128 01-Feb-2012 Dylan Noblesmith <nobled@dreamwidth.org> include clang's config.h unconditionally

And remove HAVE_CLANG_CONFIG_H, now that the header is generated
in the autoconf build, too. (clang r149497 / llvm r149498)

Also include the config.h header after all other headers, per
the LLVM coding standards.

It also turns out WindowsToolChain.cpp wasn't using the config
header at all, so that include's just deleted now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149504 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
indowsToolChain.cpp
4c5ffb32e89da30479da49b87abf560c81e4c210 31-Jan-2012 Bob Wilson <bob.wilson@apple.com> Use new Triple::getMacOSXVersion function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149439 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1085377d9b137e92fa0f9f9dfb674f6463719909 31-Jan-2012 Bob Wilson <bob.wilson@apple.com> Fix more fallout from the introduction of "macosx" and "ios" triples.

The Darwin toolchain constructor was assuming that all Darwin triples would
have an OS string starting with "darwin". Triples starting with "macosx"
would misinterpret the version number, and "ios" triples would completely
miss the version number (or worse) because the OS name is not 6 characters
long. We lose some sanity checking of triple strings here, since the
Triple.getOSVersion function doesn't do all the checking that the previous
code did, but this still seems like a step in the right direction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149422 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1d16f0f805c2a3e2198a87154990347b2759f6bd 31-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Revert r149083 which is not the direction we're going in the Clang
driver based on discussions with Doug Gregor. There are several issues:
1) The patch was not reviewed prior to commit and there were review comments.
2) The design of the functionality (triple-prefixed tool invocation)
isn't the design we want for Clang going forward: it focuses on the
"user triple" rather than on the "toolchain triple", and forces that
bit of state into the API of every single toolchain instead of
handling it automatically in the common base classes.
3) The tests provided are not stable. They fail on a few Linux variants
(Gentoo among them) and on mingw32 and some other environments.

I *am* interested in the Clang driver being able to invoke
triple-prefixed tools, but we need to design that feature the right way.
This patch just extends the previous hack without fixing the underlying
problems with it. I'm working on a new design for this that I will mail
for review by tomorrow.

I am aware that this removes functionality that NetBSD relies on, but
this is ToT, not a release. This functionality hasn't been properly
designed, implemented, and tested yet. We can't "regress" until we get
something that really works, both with the immediate use cases and with
long term maintenance of the Clang driver.

For reference, the original commit log:
Keep track of the original target the user specified before
normalization. This used to be captured in DefaultTargetTriple and is
used for the (optional) $triple-$tool lookup for cross-compilation.
Do this properly by making it an attribute of the toolchain and use it
in combination with the computed triple as index for the toolchain
lookup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149337 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
7fc800356f3c86a0c63e94353d7a1ac5a0ffbf66 30-Jan-2012 Anna Zaks <ganna@apple.com> [analyzer] Rename the checker as per Ted's comment. Remove the reference
from the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149276 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1bd91374498ac78e72545f08f4daa6491f9c9d14 26-Jan-2012 Joerg Sonnenberger <joerg@bec.de> Remove the ToolTriple logic in NetBSD, which was completely broken by
the recent refactoring. All interesting NetBSD release have a GNU as
version on i386 that supports --32, so don't bother with the conditional
setting of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149087 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
66de97fcc368ff7e9ea50337177d007c108cfd73 26-Jan-2012 Joerg Sonnenberger <joerg@bec.de> Remove obviously incorrect branch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149084 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
34144f67610be0ac6cb0d85d77bd57662b9232b9 26-Jan-2012 Joerg Sonnenberger <joerg@bec.de> Keep track of the original target the user specified before
normalization. This used to be captured in DefaultTargetTriple and is
used for the (optional) $triple-$tool lookup for cross-compilation.
Do this properly by making it an attribute of the toolchain and use it
in combination with the computed triple as index for the toolchain
lookup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149083 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
c01dfc18694bb7aa01c12bad3fb710938018728f 26-Jan-2012 Bob Wilson <bob.wilson@apple.com> Revert r148249: "Make the auto-detection hack for the iOS simulator set the target triple correctly."

There were some problems with this, so I'm backing it out for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149040 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8dc0506df167a426df324f47d8367bd824f26e7f 26-Jan-2012 Ted Kremenek <kremenek@apple.com> Enable several checkers under --analyze for general testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149016 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
24248e3df04f3d687f819f6de3429130c4680a15 26-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Reintroduce r148981 with significantly improved regression test. Now it
both actually tests what it wants to, doesn't have bogus and broken
assertions in it, and is also formatted much more cleanly and
consistently. Probably still some more that can be improved here, but
its much better.

Original commit message:
----
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149011 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
10afce37c6944acf1018138ef74ab69451d3aea6 25-Jan-2012 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r148981 because it fails test/Driver/freebsd.c

Original log:

Author: chandlerc <chandlerc@91177308-0d34-0410-b5e6-96231b3b80d8>
Date: Wed Jan 25 21:32:31 2012 +0000

Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148993 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d081baa34b8b165d204a9e48c7c29d736f9d9317 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148981 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1621e75dc4049e7b82bf81f4eb739a99f91bd3d8 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Restore a tiny bit of functionality that I completely overlooked in the
Linux toolchain selection -- sorry folks. =] This should fix the Hexagon
toolchain.

However, I would point out that I see why my testing didn't catch this
-- we have no tests for Hexagon. ;]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148977 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
00646ba867d63beeeb7124984795182cd5cc8b67 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> The Linux pattern of adding all the search paths that exist doesn't seem
to suit the FreeBSD folks. Take them back to something closer to the old
behavior. We test whether the /usr/lib32 directory exists (within the
SysRoot), and use it if so, otherwise use /usr/lib.

FreeBSD folks, let me know if this causes any problems, or if you have
further tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148953 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
32f88be6e2dbd950861858fb75b0a37b685d6267 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Remove the 'ToolTriple' concept from the NetBSD toolchain along with my
gross hack to provide it from my previous patch removing HostInfo. This
was enshrining (and hiding from my searches) the concept of storing and
diff-ing the host and target triples. We don't have the host triple
reliably available, so we need to merely inspect the target system. I've
changed the logic in selecting library search paths for NetBSD to match
what I provided for FreeBSD -- we include both search paths, but put the
32-bit-on-64-bit-host path first so it trumps.

NetBSD maintainers, you may want to tweak this, or feel free to ask me
to tweak it. I've left a FIXME here about the challeng I see in fixing
this properly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148952 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
0671555f51808b88578bf9c383ef6ba36bb17d5f 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Delete still more remnants of the now dead HostInfo. The janitoring will
continue until cleanliness improves.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148951 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
18d7f3af752c41a197552a1ff25ddd639224b4bb 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Delete the driver's HostInfo class. This abstraction just never really
did anything. The two big pieces of functionality it tried to provide
was to cache the ToolChain objects for each target, and to figure out
the exact target based on the flag set coming in to an invocation.
However, it had a lot of flaws even with those goals:
- Neither of these have anything to do with the host, or its info.
- The HostInfo class was setup as a full blown class *hierarchy* with
a separate implementation for each "host" OS. This required
dispatching just to create the objects in the first place.
- The hierarchy claimed to represent the host, when in fact it was
based on the target OS.
- Each leaf in the hierarchy was responsible for implementing the flag
processing and caching, resulting in a *lot* of copy-paste code and
quite a few bugs.
- The caching was consistently done based on architecture alone, even
though *any* aspect of the targeted triple might change the behavior
of the configured toolchain.
- Flag processing was already being done in the Driver proper,
separating the flag handling even more than it already is.

Instead of this, we can simply have the dispatch logic in the Driver
which previously created a HostInfo object create the ToolChain objects.
Adding caching in the Driver layer is a tiny amount of code. Finally,
pulling the flag processing into the Driver puts it where it belongs and
consolidates it in one location.

The result is that two functions, and maybe 100 lines of new code
replace over 10 classes and 800 lines of code. Woot.

This also paves the way to introduce more detailed ToolChain objects for
various OSes without threading through a new HostInfo type as well, and
the accompanying boiler plate. That, of course, was the yak I started to
shave that began this entire refactoring escapade. Wheee!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148950 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
river.cpp
ostInfo.cpp
ools.cpp
4d7ff6e8639bdce74e39b90370729ad0179ebcca 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Switch the ToolChain types to all store a Driver reference rather than
a HostInfo reference. Nothing about the HostInfo was used by any
toolchain except digging out the driver from it. This just makes that
a lot more direct. The change was accomplished entirely mechanically.
It's one step closer to removing the shim full of buggy copy/paste code
that is HostInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148945 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
08386a9769575bd8290024aaaecb2dbad5bfd59d 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Remove the TargetTriple object that I added to the Driver recently. This
helped stage the refactoring of things a bit, but really isn't the right
place for it. The driver may be responsible for compilations with many
different targets. In those cases, having a target triple in the driver
is actively misleading because for many of those compilations that is
not actually the triple being targeted.

This moves the last remaining users of the Driver's target triple to
instead use the ToolChain's target triple. The toolchain has a single,
concrete target it operates over, making this a more stable and natural
home for it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148942 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ea0428523b38298da44cdb894c481efa71fd4a56 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Have FreeBSD use even more of the same smarts as Linux is now using for
adding search paths. Add them only when they exist, and prefix the paths
with the sysroot. This will allow targeting a FreeBSD sysroot on
a non-FreeBSD host machine, and perhaps more importantly should allow
testing the FreeBSD driver's behavior similarly to the Linux tests with
a fake tree of files in the regression test suite.

I don't have FreeBSD systems handy to build up the list of files that
should be used here, but this is the basic functionality and I'm hoping
Roman or someone from the community can contribute the actual test
cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148940 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6f75cc3365da11c3677d961bbb11d1e86e3d2fc2 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Switch FreeBSD to just include both '/usr/lib32' and '/usr/lib' in the
search paths for 32-bit targets. This avoids having to detect which is
expected for the target system, and the linker should DTRT, and take the
32-bit libraries from the first one when applicable. Thanks to Roman
Divacky for sanity checking this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148939 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
fc52f7526ea0adfcbdbe76a3c4fcdcbb1f1b08b6 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Switch the Linux C++ standard library header search logic over to use
the GCC installation's multiarch suffix now that it is exposed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148938 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1c6f04a28d8a8e3eca966385815305b13e0a6a05 25-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Make a major refactoring to how the GCC installation detection works.

The fundamental shift here is to stop making *any* assumptions about the
*host* triple. Where these assumptions you ask? Why, they were in one of
the two target triples referenced of course. This was the single biggest
place where the previously named "host triple" was actually used as
such. ;] The reason we were reasoning about the host is in order to
detect the use of '-m32' or '-m64' flags to change the target. These
flags shift the default target only slightly, which typically means
a slight deviation from the host. When using these flags, the GCC
installation is under a different triple from the one actually targeted
in the compilation, and we used the host triple to find it.

Too bad that wasn't even correct. Consider an x86 Linux host which has
a PPC64 cross-compiling GCC toolchain installed. This toolchain is also
configured for multiarch compiling and can target PPC32 with eth '-m32'
flag. When targeting 'powerpc-linux-gnu' or some other PPC32 triple, we
have to look for the PPC64 variant of the triple to find the GCC
install, and that triple is neither the host nor target.

The new logic computes the multiarch's alternate triple from the target
triple, and looks under both sides. It also looks more aggressively for
the correct subdirectory of the GCC installation, and exposes the
subdirectory in a nice programmatic way. This '/32' or '/64' suffix is
something we can reuse in many other parts of the toolchain.

An important note -- while this likely fixes a large category of
cross-compile use cases, that's not my primary goal, and I've not done
testing (or added test cases) for scenarios that may now work. If
someone else wants to try more interesting PPC cross compiles, I'd love
to have reports. But my focus is on factoring away the references to the
"host" triple. The refactoring is my goal, and so I'm mostly relying on
the existing (pretty good) test coverage we have here.

Future patches will leverage this new functionality to factor out more
and more of the toolchain's triple manipulation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148935 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
89088797876bddb866ce821f050a4395b7514dc2 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Fix one of the (larger) FIXMEs where we were misusing the Driver's idea
of the target triple to stand in for the "host" triple.

Thanks to a great conversation with Richard Smith, I'm now much more
confident in how this is proceeding. In all of the places where we
currently reason about the "host" architecture or triple, what we really
want to reason about in the detected GCC installation architecture or
triple, and the ways in which that differs from the target. When we find
a GCC installation with a different triple from our target *but capable
of targeting our target* through an option such as '-m64', we want to
detect *that* case and change the paths within the GCC installation (and
libstdc++ installation) to reflect this difference.

This patch makes one function do this correctly. Subsequent commits will
hoist the logic used here into the GCCInstallation utility, and then
reuse it through the rest of the toolchains to fix the remaining places
where this is currently happening.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148852 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
fa5be916273be4d2e0ef8db050c8bdd404b95555 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Address one part of the FIXME I introduced my switching the triple
inside of GCCInstallation to be a proper llvm::Triple. This is still
a touch ugly because we have to use it as a string in so many places,
but I think on the whole the more structured representation is better.

Comments of course welcome if this tradeoff isn't working for folks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148843 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
5d84bb418405e1256020a66895d163756886b102 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> At least within these classes, consistently spell 'GCC' as 'GCC'.
I can't read Java-style 'Gcc' acronyms. ;]

No functionality changed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148840 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
58f2b298d80ccc06dd1d5f759a80fc5f6133d8ad 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Start hoisting the logic for computing the target triple into its own
function. The logic for this, and I want to emphasize that this is the
logic for computing the *target* triple, is currently scattered
throughout various different HostInfo classes ToolChain factoring
functions. Best part, it is largely *duplicated* there. The goal is to
hoist all of that up to here where we can deal with it once, and in
a consistent manner.

Unfortunately, this uncovers more fun problems: the ToolChains assume
that the *actual* target triple is the one passed into them by these
factory functions, while the *host* triple is the one in the driver.
This already was a lie, and a damn lie, when the '-target' flag was
specified. It only really worked when the difference stemmed from '-m32'
and '-m64' flags. I'll have to fix that (and remove all the FIXMEs I've
introduced here to document the problem) before I can finish hoisting
the target-calculation logic.

It's bugs all the way down today it seems...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148839 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
4a04d0b4aa33e98ea9e7b3e787f0490585ce9b6f 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Remove HostInfo::useDriverDriver(). This was only used in two places
inside the innards of the Driver implementation, and only ever
implemented to return 'true' for the Darwin OSes. Instead use a more
direct query on the target triple and a comment to document why the
target matters here.

If anyone is worried about this predicate getting wider use or improper
use, I can make it a local or private predicate in the driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148797 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
91e6076b9bf5e09dc6b202d17a5647b724e6f6e6 24-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Hoist the targeted triple object into an actual object in the Driver.
The Driver has a fixed target, whether we like it or not, the
DefaultTargetTriple is not a default. This at least makes things more
honest. I'll eventually get rid of most (if not all) of
DefaultTargetTriple with this proper triple object. Bit of a WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148796 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
b4f90c28fabd167d59c63b445757b744dcb42971 21-Jan-2012 NAKAMURA Takumi <geek4civic@gmail.com> [Cygwin] Abandon Cygwin-1.5 and g++-3. Use g++-4.3 and higher on Cygwin-1.7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148636 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9ec60dfe771ff28a84889dced6f8fd3748d3d55e 20-Jan-2012 Sebastian Pop <spop@codeaurora.org> rename -ccc-host-triple into -target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148582 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a8180e5a8795b4b80587662167dfc13646a494a1 20-Jan-2012 Ted Kremenek <kremenek@apple.com> Reenable DeadStoresChecker under --analyze, and move the IdempotentOperationsChecker to the 'experimental' category. Fixes <rdar://problem/10146347>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148533 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
64554ba9fc5f251108fd7d10a9c218e7bf985941 18-Jan-2012 Douglas Gregor <dgregor@apple.com> In the driver, -fmodules enables modules for C/Objective-C but one
also needs -fcxx-modules to enable modules for C++/Objective-C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148393 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
561d3abc881033776ece385a01a510e1cbc1fa92 17-Jan-2012 David Blaikie <dblaikie@gmail.com> Remove unnecessary default cases in switches over enums.

This allows -Wswitch-enum to find switches that need updating when these enums are modified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148281 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
100d04165571d42437c8e74482534e69495540ec 16-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Make the auto-detection hack for the iOS simulator set the target triple correctly. Getting the target triple wrong mostly appears to work, but messes up in subtle cases; for example, we incorrectly conclude that fwrite is actually named fwrite$UNIX2003. Also shuffles around the auto-detection code a bit to try and make it a bit more reliable. Fixes <rdar://problem/10664848>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148249 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
abac441b7d114d5980864093ee0643bf68f1a8f2 14-Jan-2012 Chad Rosier <mcrosier@apple.com> Fix 80-column violation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148162 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
31cbe684302a5ccb001fa2131c0e4aeaa372f5c0 13-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r148138; it's causing test failures.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148141 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
43115d4904431917ef6852ee089a8520b9940ba5 13-Jan-2012 Sebastian Pop <spop@codeaurora.org> remove assertions in the Hexagon backend specific clang driver

Patch from Jyotsna Verma:

I have made the changes to remove assertions in the Hexagon backend
specific clang driver. Instead of asserting on invalid arch name, it has
been modified to use the default value.

I have changed the implementation of the CPU flag validation for the
Hexagon backend. Earlier, the clang driver performed the check and
asserted on invalid inputs. In the new implementation, the driver passes
the last CPU flag (or sets to "v4" if not specified) to the compiler (and
also to the assembler and linker which perform their own check) instead of
asserting on incorrect values. This patch changes the setCPU function for
the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the
compiler to error out on incorrect CPU flag values.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148139 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
edd4f3c39101912605c2a1868dd2be71aa218798 13-Jan-2012 Sebastian Pop <spop@codeaurora.org> rename -ccc-host-triple into -target

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148138 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9606a57b6f2c43bf438a958fdffea1de60f6b2b7 13-Jan-2012 Sebastian Pop <spop@codeaurora.org> rename DefaultHostTriple into DefaultTargetTriple

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148137 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
704e7328a119e6024c9f63b21329bc612098c6dd 13-Jan-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Remove --hash-style from link command on Android.

Gnu hash is not supported by the Android loader.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148113 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3d33622cf50fe8bd2f10e71b9135bc5c74b1786e 12-Jan-2012 Ted Kremenek <kremenek@apple.com> Adjust set of default checkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148055 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
35dd732fdff0e31ef0a24d76b7106597862adfcf 11-Jan-2012 Evgeniy Stepanov <eugeni.stepanov@gmail.com> Fix -mfpu parsing on ARM.

- Support gcc-compatible vfpv3 name in addition to vfp3.
- Support vfpv3-d16.
- Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions
for those!).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147943 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
983d835bead0134170a6646a8844926077c968d6 11-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert changes to lib/Driver in r147917; I didn't mean to commit this.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147920 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b69b42c55d56815bab62991bf839cdb41634d3af 11-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Start refactoring code for capturing variables and 'this' so that it is shared between lambda expressions and block literals.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147917 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b43550bf1bd944a16cdae9703cb1c2049b04e6bd 10-Jan-2012 Chandler Carruth <chandlerc@gmail.com> Add support for the androideabi environment to our triple support, and
for the arm-linux-androideabi triple in particular.

Also use this to do a better job of selecting soft FP settings.

Patch by Evgeniy Stepanov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147872 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
8f0a403945b60a8a8a56a7721bb66f6b84ec129b 10-Jan-2012 Eric Christopher <echristo@apple.com> Add -g to the cc1as flags only if we're dealing with an original
source file. Otherwise -g -save-temps will error out on the compile
of any .c file.

Fixes about 4000 of the errors in the clang-tests gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147819 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
46d2a5c7f95a5dc2df95103c82802d2324b333e9 10-Jan-2012 Eric Christopher <echristo@apple.com> Remove extraneous braces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147818 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d97927d69b277120f8d403580c44acd84907d7b4 06-Jan-2012 Eli Friedman <eli.friedman@gmail.com> Revert r147664; it's breaking clang regression tests.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147681 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2d5f0952a93dae4b648f2b33bab621ad6e932d9a 06-Jan-2012 Jakub Staszak <kubastaszak@gmail.com> Silence GCC warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147664 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d2d2088c569a15c8ad75e70f995ff5a879f4fc49 04-Jan-2012 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Remove a hack that avoided passing -demangle to iOS linkers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147552 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ed002bd2f9eaea6ed5030ccd90fdaa870598a16a 03-Jan-2012 Chad Rosier <mcrosier@apple.com> Fixed by Chandler in r147434.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147489 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7025d2cc327ec75353454586df2987afce5e5789 03-Jan-2012 Douglas Gregor <dgregor@apple.com> Add -fno-modules to the driver, to turn off modules (although they're off by default anyway).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147449 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
rgList.cpp
ools.cpp
0e743b1582d53d3ebb2074da881e00bfb759f250 28-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Handle a /etc/debian_version with a version number instead of a codename.
Patch by Sylvestre Ledru. Fixes PR11673.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147313 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a11d3098624dd9c136c713ff8a513150ce88580e 26-Dec-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix potential use after free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147277 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
17ba267cae596d5eb35fa0963ebcf73571572940 23-Dec-2011 Anton Yartsev <anton.yartsev@gmail.com> fix for PR11634

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147224 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
567003e572eed69cf1e8a04601076c8803355c7a 22-Dec-2011 Kevin Enderby <enderby@apple.com> Last part of support for generating dwarf for assembly source files. This gets
the clang driver to enable this when assembling a .s file. rdar://9275556


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147167 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
99ba9e3bd70671f3441fb974895f226a83ce0e66 20-Dec-2011 David Blaikie <dblaikie@gmail.com> Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146959 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ob.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
79cbbdc8affe52591f7ee487a789639aa38331ec 18-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Split the Windows toolchain definition into its own file. This is
especially nice as the Windows toolchain needs the windows header files,
and has lots of platform specific hooks in it.

To facilitate the split, hoist a bunch of file-level static helpers into
class-level static helpers. Spiff up their doxygen comments while there
as they're now more likely to be looked up via docs.

Hopefully, this will be followed by further breaking apart of the
toolchain definitions. Most of the large and complex ones should likely
live on their own. I'm looking at you Darwin. ;]

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146840 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
oolChain.cpp
oolChains.cpp
oolChains.h
indowsToolChain.cpp
657849c60378b045a9e904f35ece8fd84425a20a 17-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Fix an abiguous-else warning from GCC. I have no idea why Clang doesn't
have this warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146839 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
298aaf2c97ab7c4d5bd3a8e8d8112e3bc77b29b6 16-Dec-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r146715 (Dec 16th 2011)

Change-Id: I66024a7b6eb0ee37d7b3ff7ce41c0bfb4b514bee
62d829abaf61d70483a5a584059440a549a306bf 15-Dec-2011 Eli Friedman <eli.friedman@gmail.com> gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146631 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a2a178989b2f6623b6a8ccf73dc0ccd98ee5bdf9 14-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix typos.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146595 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6af27ec69560f7e4b0dac4a0b4341cd6062f6852 14-Dec-2011 Rafael Espindola <rafael.espindola@gmail.com> Don't use the frame pointer on linux x86 and x86_64 if optimizing. This
matches gcc's behavior.

Fixes PR8186.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146586 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dfba0278ce3b9cd86f5a050163ccb998aeb74aa6 14-Dec-2011 Bob Wilson <bob.wilson@apple.com> Enable stack protectors by default for iOS. <rdar://problem/8836680>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146552 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
db103cc92518a3986a12802b06db74371e2cfce8 13-Dec-2011 Nick Lewycky <nicholas@mxc.ca> Fix "control may reach end of non-void function" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146448 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
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
ools.cpp
d4e6e7e4a8c1f64162e14220579abab53e0ca10c 09-Dec-2011 Chandler Carruth <chandlerc@gmail.com> Fix the --hash-style option when the target is MIPS as it is
incompatible with the MIPS ABI.

Patch by Simon Atanasyan.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146243 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6d402dc963aa32194f3604af4463b113858291ae 09-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Misc Minix-specific changes to clang:

. move compiler-rt to a separate directory so the -L argument only includes compiler-rt (thanks joerg)
. build all clang subdirs
. switches the Minix platform to ELF
. normalizes toolchain invocation

Patch by Ben Gras.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146206 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
2e55df49929a515b05f3af89b47a13357eccd9d0 08-Dec-2011 Hal Finkel <hfinkel@anl.gov> Allow clang to find gcc libs on suse ppc64

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146142 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4ce83eba01c582fa4cbed25f74aaa2c5bf7d4fde 08-Dec-2011 Bob Wilson <bob.wilson@apple.com> Minor cleanup. Avoid redundant getTriple() calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146122 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8cd0d25df91d7172bfd0ed6013f89ad0083ce301 08-Dec-2011 Daniel Dunbar <daniel@zuster.org> Driver/Linux: Fix the ASAN library path to match current compiler-rt
integration.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146098 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c24767c9dd869ba0e78c2d4c86d86ed24b8e401e 08-Dec-2011 Daniel Dunbar <daniel@zuster.org> Driver: Add a --rtlib={compiler-rt,libgcc} argument which I plan to use to allow
dual support for compiler-rt on Linux, during bringup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146094 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
1c636df9f47dcfe5633eca6965db84c2e83ccc58 07-Dec-2011 Eli Friedman <eli.friedman@gmail.com> Fix multilib library paths on ppc64 Linux. Patch by Michael Kostylev. PR11472.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146016 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7b5f1013c5b7f541dc1fae7fc43189377874eabb 06-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] Mac: do not link dynamic libs with the asan-rt, use -undefined dynamic_lookup for dynamic libs. Style fixes. Patch by glider@google.com

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145955 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.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
ools.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
ools.cpp
8179aa77b679cd483a4307c80e40fa02996eb874 05-Dec-2011 Kostya Serebryany <kcc@google.com> [asan] don't require libstdc++ for asan on linux. Mac fix will go separately

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145823 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
94b54ea787e439496fde16b3d2882d6d1b22d4f0 02-Dec-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add ASAN runtime library link support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145651 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c85900f4d6aec17ef29140bfc97977463ac75cb2 30-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Get the -march argument based on the target MIPS architecture or cpu and pass
it to GNU assembler. In addition, change function getMipsArchFromCPU() so that
it can be reused in ConstructJob().

Patch by Simon Atanasyan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145509 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dff466c0791465f929a1d8cd551d4c84b360ba32 30-Nov-2011 Kostya Serebryany <kcc@google.com> when -faddress-sanitizer is present, add required flags to the linker command (linux-only)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145467 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
592d26eafab66ba6288c09b66068c67ab2764c35 30-Nov-2011 Akira Hatanaka <ahatanaka@mips.com> Change processor names. Patch by Simon Atanasyan.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145453 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
573ea9683113064d8d72b9f6a119a63136860181 29-Nov-2011 NAKAMURA Takumi <geek4civic@gmail.com> [Win32] Catch exceptions (eg. segfault) on waiting for invoked clang from the driver.

clang/lib/Driver/Driver.cpp: Don't pass through negative exit status, or parent would be confused.

llvm::sys::Program::Wait(): Suppose 0x8000XXXX and 0xC000XXXX as abnormal exit code and pass it as negative value.

Win32 Exception Handler: Exit with ExceptionCode on an unhandle exception.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145389 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7972c88f674475037fa11fea718565e5bcdd61a6 29-Nov-2011 Eli Friedman <eli.friedman@gmail.com> A couple driver fixes for PPC Linux. Patches by Michael Kostylev. PR11444/PR11445.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145321 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
2a710c84db1ebf0c16cba0ff121ca8e15f045a07 25-Nov-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r145117 (Nov 25th 2011)

Change-Id: Id4fde985342e3c81f13887e8728bd94b82523642
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
ools.cpp
1052c1dc52447643dac5484d3a22ab836c781f47 21-Nov-2011 Roman Divacky <rdivacky@freebsd.org> Change the linker emulation name for FreeBSD/PPC32.

Submitted by Andreas Tobler!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145041 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5d4d9807a65291cbe6ab88d4a4f74cb7fff01bde 21-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Teach the driver about failure result files, which are compilation
output files that are valid regardless of whether the compilation
succeeded or failed (but not if we crash). Add depfiles to the
failure result file list.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145018 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ecff7c80e5ce4ccb1d2765c234c88efafdc1a378 19-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Driver: Remove the signal number from the "command failed" diagnostic.

- With the current implementation of sys::Program this always printed "2".
- The command execution code will output the right number anyway (including the signal name).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144993 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f471487ff1e673531543576bc170898c2ab19f41 17-Nov-2011 Daniel Dunbar <daniel@zuster.org> clang/Darwin: Use the compiler-rt provided profile library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144869 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.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
ools.cpp
71d9a71d19099a6673750b47b32e9786803fa81d 15-Nov-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r144605 (Nov 15th 2011)

Conflicts:
include/clang-c/Index.h
include/clang/AST/APValue.h
include/clang/AST/DeclBase.h
include/clang/AST/DeclObjC.h
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Serialization/ASTWriter.h
lib/AST/APValue.cpp
lib/AST/ASTImporter.cpp
lib/AST/DeclObjC.cpp
lib/AST/ExprConstant.cpp
lib/Driver/ToolChains.cpp
lib/Frontend/SerializedDiagnosticPrinter.cpp
lib/Frontend/Warnings.cpp
lib/Lex/HeaderSearch.cpp
lib/Lex/LiteralSupport.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaPseudoObject.cpp
test/Analysis/misc-ps.c
test/Analysis/retain-release-path-notes.m
test/CodeGen/string-literal-unicode-conversion.c
test/CodeGenCXX/blocks.cpp
test/Driver/crash-cleanup.c
test/Misc/serialized-diags.c
test/Misc/warning-flags.c
tools/c-index-test/c-index-test.c
tools/libclang/CXLoadedDiagnostic.cpp
tools/libclang/IndexDecl.cpp
tools/libclang/IndexTypeSourceInfo.cpp
tools/libclang/Indexing.cpp
tools/libclang/IndexingContext.cpp
tools/libclang/IndexingContext.h
tools/libclang/libclang.exports

Change-Id: I6621e7d5d9a9d1e4cdec7b7b62ffa6dffaff375d
e1ba5be96e57738ba0d6302cdb471e12107a3201 15-Nov-2011 Matt Beaumont-Gay <matthewbg@google.com> Don't track depfiles as result files which need to be cleaned up on failure.

This is a partial revert of r143846. While cleaning up after a crash is
probably a good idea, we were also deleting .d files if the compilation failed
due to invalid input, which is not the desired behavior. The test is XFAIL'd
until the cleanup code can be reworked to do the right thing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144590 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0499f76f09137ba4225df120b215caac643d8eeb 11-Nov-2011 Ted Kremenek <kremenek@apple.com> Add top-level driver option '--serialize-diagnostics' for serialize compiler diagnostics to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144339 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d1b26c16c9f7fab1365ec7e3535da3ef1cefe527 09-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix an issue that Duncan discovered on a specific (no longer current)
version of Ubuntu. It has a very broken multiarch configuration, and so
we need special logic to handle it correctly. Fixing and testing this
uncovered a few other trivial issues with the logic that are fixed as
well.

I added tests to cover this as it is hard to notice if you install
recent versions of the OS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144165 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ce7e4452c3f0cd48c9c91cd41e6e30ed8654911c 08-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Misc fixes for clang driver on Mips Linux. Patch by Simon Atanasyan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144108 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
65e1cb435d8bd397c70a3b85e8de288bd00fec93 08-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a default system include of '/include'. This isn't particularly
useful when using Clang as a system-compiler, but its harmless. When
using Clang as a cross-compiler, this can be very handy as quite a few
toolchains ship their libc headers here rather than under
'/usr/include'.

For reference, this is the beginning of my work to also make the Clang
driver more suitable as a cross-compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144089 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f5ddabf1e94559666238bc77d4177dff77b779dc 07-Nov-2011 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144002 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c2ea8d33f4846be5b972c01f53c59a24c136925 07-Nov-2011 Chad Rosier <mcrosier@apple.com> Tablegenify -g options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144001 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2c4a9bcb832320a62cf7919b30cf99aae81f6593 07-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix an unsafe use of Twine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143962 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5b077a99629d0394531745da14afa871e0fb41c4 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
oolChains.cpp
6ef1a0b0a8840686e66b71d3d3ba810845015fc8 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix Linux libc++ usage. Somehow this slipped through during the port.

Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143916 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1b40efee87ba7ca6b51718f4ab3f0528e3eb3175 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Begin lifting some of the one-off checking logic into generic helper
routines on the base toolchain class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143900 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
e269cf0672b6cc881ecf93ad513e92dbd43b5b5b 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the GCC installation detection logic down into the Generic_GCC
toolchain. The logic is mostly generic already, and where possible
should be made more generic. Also, it has no impact other than to expose
a set of methods which each toolchain can then query to setup their
desired configuration. These should be available to toolchains beyond
just Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143899 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
4983ec4b9e773693b99c7ee8f4b52f5eb018d107 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove an old OpenSUSE hack that is no longer needed -- it is exactly
the same as a directory added further down in the new logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143897 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f02f2cea404b532f464a522ba99974c620ed761c 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove the HasMultilib check. It was essentially useless. The driver now
looks for evidence of a multilib installation, and adds the appropriate
bits to the search paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143896 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8a26389ef4cf17987935c8ce78a9ffe70ee02e47 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> The version objects need to actually store the version strings; they
aren't guaranteed to live long enough otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143875 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
9207da103fa84f2cafb4cb97139fbbb2057ed8f1 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Throw the switch and move all Linux header search over to the GCC
detection system that is providing the library paths and crt object
files.

This, modulo any bugs that need to be shaken out, resolves numerous bugs
with how we handle header paths. Here are a few that I know of:
- We no longer need to enumerate all GCC versions searched.
- OpenSUSE searched GCC versions in the wrong order.
- There were typos when selecting various patterns, etc.
- We aren't stating quite some many directories now.
- SysRoot didn't always work in a reasonable way.

I'm working on tests for this, but the tests are making me and Lit sad.
The real testing for this type of driver change is to try it out on
various distributions. I'll hit the common ones right away, and start
more thorough testing tomorrow after some sleep.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143874 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ad5cd20dd5750d6e4e58b6ceb24a9c988071a00b 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a missing triple spotted by inspecting and testing of the include
path triples. Also order the 32-bit triples a bit more reasonably.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143873 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a619afb53719c152aeae7f81e0807ee519bfdda5 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Lift the GCCVersion type into the header file and start persisting it in
the detected GCC installation. This allows us to expose another aspect
of what we detected: the GCC version. This will be used shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143871 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
86680d71c19ed383d2fa36967f14535cee4c2218 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143869 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
4309604854c31aa1256ddc625fc622c4396f575a 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Take a better approach to detecting and selecting multiarch include
directories. This way we stop at the first multiarch directory found on
the system. This achieves the real intended result of pruning
non-existent directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143866 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d29d69f740fa2a9f7e758322fc00c9127899bcc6 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Revert r143864, as the problem I was actually looking at can be solved
a better way. The more I think about it the more worried I am that this
hammer is simply too large. We should only be reaching out to the
filesystem when doing interesting "detection" things, not gratuitously.

Original commit message:
Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143865 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ab3f00763268f4bd7ccc9da199cb6e5b48d448f2 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143864 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
13d0aff93bd84d78a2efab5ac4e3ef0760551e23 06-Nov-2011 David Blaikie <dblaikie@gmail.com> Fixing -g break caused by a dead reference to a temporary introduced in r143732.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
583a6774a1a688490e6871e01fbff39ec6eea163 06-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Add the depfile as a result file so that it is deleted if we crash,
and prevent the diagnostic preprocessor run from writing a depfile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143846 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ools.cpp
ools.h
eece88288fe8d43de872f411787cf9c43a125606 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the GCC version parsing and comparison logic to handle some more
edge cases and have better behavior. Specifically, we should actually
prefer the general '4.6' version string over the '4.6.1' string, as
'4.6.2' should be able to replace it without breaking rpaths or any
other place that these paths have been embedded. Debian-based
distributions are already using a path structure with symlinks to
achieve in-place upgrades for patch versions. Now our parsing reflects
this and we select the shorter paths instead of the longer paths.

A separate issue was that we would not parse a leading patch version
number even in the presence of a suffix. The above change makes this
more problematic as it would cause a suffix being added to make us treat
the entire thing as patch-version-agnostic, which it isn't. This changes
the logic to distinguish between '4.4.x' and 4.4.1-x', and retain that
the latter has *some* patch number information. Currently, we always
bias toward the shorter and more canonical version strings. If it
becomes important we can add more Debian like rules to produce sequences
such as '4.4.1b' > '4.4.1' > '4.4.1-rc3' > '4.4.1-rc2' > '4.4.1-pre5',
but I'm very doubtful this will ever matter or be desirable.

I've made the tests for this logic a bit more interesting, and added
some specific tests for logic that is now different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143841 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8a80efe3457e08c3d53cea584ba7d31b6aeaf476 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove a pointless member. I have no idea why I made this not a local
variable to begin with... As I'm planning to add include root
information to this object, this would have caused confusion. It didn't
even *actually* hold the include root by the time we were done with it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143840 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
577e1a9cbcac5cce82d0136a23b4811ece0fda80 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove a no-longer needed helper function. Thanks for implementing this
Michael!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
58e013fa7ae7332b7e6d6d9cecf32569cdd4cc8d 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the GCC installation detection helper a member of the Linux
toolchain instead of merely using it in the constructor. This will allow
us to query it when building include paths as well as the file search
paths built in the constructor. I've lifted as little of it as I could
into the header file.

Eventually this will likely sink down into some of the Generic
toolchains and be used on more platforms, but I'm starting on Linux so
I can work out all the APIs needed there, where it is easiest to test
and we have the most pressing need.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143838 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
6f750078a0f66fe887eba4a9590f8837e9fa4c65 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove support for Gentoo subversion-ebuild installed llvm-gcc libstdc++
headers. As llvm-gcc is dead, and I have no idea if this ever really
worked, I think it's time for it to go. More importantly, it makes it
harder to generalize the include search logic. If someone really wants
these to work, they can set the CPLUS_INCLUDE_PATH environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143836 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c9b8daa1fb95f10d4d5c151697bbeefa17c93f70 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the Linux header searching from the Frontend to the Driver. This is
the first (and diff-noisiest) step to making Linux header searching
tremendously more principled and less brittle. Note that this step
should have essentially no functional impact. We still search the exact
same set of paths in the exact same order. The only change here is where
the code implementing such a search lives.

This has one obvious negative impact -- we now pass a ludicrous number
of flags to the CC1 layer. That should go away as I re-base this logic
on the logic to detect a GCC installation. I want to do this in two
phases so the bots can tell me if this step alone breaks something, and
so that the diffs of the refactoring make more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143822 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
fa9773c219f8ebe3e3c9e3cacc7fb70b712c4ebf 05-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Try to reduce the nastiness that creeps in through Windows.h a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143816 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d18c714ffe42a2cbc54b5db563baa9b035ffea96 05-Nov-2011 Chad Rosier <mcrosier@apple.com> [driver] If we're only linking, don't warn about unused arguments which are
obviously only used during compilation.
rdar://10386708


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143813 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
09476d9498be9acd22508d99451f7c90af24447b 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
oolChains.cpp
47ae192fe624c6a684140311fd2f6a70ccfce563 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
oolChains.cpp
0415413e1e08ff0f3a946d0bc391a8196d11e9d5 05-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> On Linux, enable the gold plugin if we are using LTO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143778 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e6e3186373a011be60b28524209718676d7012be 05-Nov-2011 Michael J. Spencer <bigcheesegs@gmail.com> Fix MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143770 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
oolChains.cpp
b2cf89f50c2072d94c51a1128c2d6dbe9db6bdd1 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Begin the migration of header search logic to the driver, starting with
Windows. There are still FIXMEs and lots of problems with this code.
Some of them will be addressed shortly by my follow-up patches, but most
are going to wait until we isolate this code and can fix it properly.
This version should be no worse than what we had before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143752 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
f9df65cf018f6333e4751c3f35a0b35bfae181ea 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Switch the C++ include interface in the ToolChain to use the same naming
as the system include interface before I start adding implementations of
it to individual ToolChain implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143751 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
f28958906e8e9d556e87c7dec2eac23452e16e21 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
ools.cpp
b2bb5fece3a6d42266c36354a5013949e9e9020b 04-Nov-2011 Chad Rosier <mcrosier@apple.com> [driver] Don't blindly accept all -g options.
rdar://10383444


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143732 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
740d56c5be97ba6d77f0087afc0df4145c9d53c9 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Sink the strange '-stdlib=...' flag handling into the C++ include
handling logic of the generic ToolChain. This flag, despite its name,
has *nothing* to do with the GCC flag '-nostdlib' that relates
(exclusively) to the linking behavior. It is a most unfortunate name in
that regard...

It is used to tell InitHeaderSearch.cpp *which* set of C++ standard
library header search paths to use -- those for libstdc++ from GCC's
installation, or those from a libc++ installation. As this logic is
hoisted out of the Frontend, and into the Driver as part of this
ToolChain, the generic method will be overridden for the platform, where
it can implement this logic directly. As such, hiding the CC1 option
passing in the generic space is a natural fit despite the odd naming.

Also, expand on the comments to clarify whats going on, and tidy up the
Tools.cpp code now that its simpler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143687 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
01a8c2fb3a74b66db639f54cfec417fd3b1c9dd0 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
implementation in the driver. This cleans up the signature and semantics
of the include flag adding component of the toolchain. Another step to
ready it for holding all the InitHeaderSearch logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143686 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
ec6bd8ca6b5efeddb1fe8655cefa1060836cb87f 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a FIXME to cleanup the CPATH handling. It's currently burried with
the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the
driver profitably, removing more noise from the driver -> frontend
communication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143685 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9b6402eb40bf1780158b4b82822aea65d7291092 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a system include management interface to the toolchain, and call it
and the C++ include management routine from the proper place when
forming preprocessor options in the driver. This is the first step to
teaching the driver to manage all of the header search paths. Currently,
these methods remain just stubs in the abstract toolchain. Subsequent
patches will flesh them out with implementations for various toolchains
based on the current code in InitHeaderSearch.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143684 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
7fb9d1056523beb1d54f858bf384c04da5f6a113 02-Nov-2011 Chad Rosier <mcrosier@apple.com> In addition to dumping preprocessed source, dump a script with the command line
arguments that caused clang to crash.
rdar://8314451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143573 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
82fb2e4ff64a38e05cad760cc94ab974b84a65e7 02-Nov-2011 Bob Wilson <bob.wilson@apple.com> Invoke the Darwin assembler with -g instead of --gdwarf2.

The -g and --gdwarf2 options are currently synonyms to the Darwin assembler.
But clang itself does not recognize --gdwarf2, so if we want to experiment
with using clang, with its integrated assembler, to replace the default
assembler, it is necessary to use -g. <rdar://problem/10349486>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143533 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0e13ea6a2981316357824ff4265e7b8664d470b1 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
ools.cpp
eb60a26d31bf5bfa006ebca161b6770e0dbfc219 31-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Simplify the set of directories we look for on multiarch systems.
I don't have any Debian system with one of these currently, and it seems
unlikely for one to show up suddenly. We can add more patterns here if
they become necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143346 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e15d01142736a500f292d1c9ebee332ef84b9c4c 31-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Fix part of PR11223 and probably a few dups as well. This teaches the
library search logic to "properly" handle multiarch installations. I've
tested this on both Debian unstable and the latest Ubuntu which both use
this setup, and this appears to work largely the same way as GCC does.
It isn't exactly the same, but it is close enough and more principled in
its behavior where it differs. This should resolve any failures to find
'crt1.o' etc on Debian-based Linux distributions. If folks find more
cases where we fail, please file bugs and CC me.

Test cases for all of the debian silliness are waiting both to simplify
the process of merging these down into the 3.0 release, and because
they're so crazy I haven't yet been able to really produce a fake tree
that represents what we need to test for. I'll eventually add them
though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143344 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9c8052be5efa32e4e6d995ca1abe32dc81518f08 30-Oct-2011 Bob Wilson <bob.wilson@apple.com> Stop disabling integrated assembler with -static. <rdar://problem/10175391>

The integrated assembler seems to be working pretty well for -static code
now, so remove the hacks to disable it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143304 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
01a666e06e3f3c664b6fd284b9f042767d3a4904 25-Oct-2011 Eric Christopher <echristo@apple.com> Allow the -fno-operator-names option to be passed down to the rest
of the compiler.

Fixes PR10198
Patch by Brian Foley!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142913 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4dc03961bcc6bf521cefbdacc934638ae88ebd37 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the SystemZ backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1138bb9ead071c616c7da231fffb430ab9d4e47f 24-Oct-2011 Douglas Gregor <dgregor@apple.com> Have -fms-no-extensions turn off -fms-compatibility

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142798 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6eafffd01f275eda02efc070d55284b92dc52723 22-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Pack struct better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142725 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
C1Options.cpp
riverOptions.cpp
6db0281bdb0816db0fe736a4f782382c9818b93d 22-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142720 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c8f2c405e2c57d11f4315f3f0cfc71d75ba6cfd5 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
ools.cpp
5a5dcdc9314204f103b879b5033a736af0e3462b 11-Nov-2011 Bob Wilson <bob.wilson@apple.com> Search for libstdc++.dylib in llvm-gcc's files on darwin10. rdar://10419079

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144381 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d7df785e8ba3284c66c1a05537f9e1c8cc27d252 11-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Add Linux multiarch include directories for mips/mipsel. Patch from Simon Atanasyan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144358 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
36f6e30d5c21a693abf2612ef086e83e9696f0e0 11-Nov-2011 Ted Kremenek <kremenek@apple.com> Add top-level driver option '--serialize-diagnostics' for serialize compiler diagnostics to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144339 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d936d9d9abae0e5018fa0233aa51ac8390a6778f 09-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix an issue that Duncan discovered on a specific (no longer current)
version of Ubuntu. It has a very broken multiarch configuration, and so
we need special logic to handle it correctly. Fixing and testing this
uncovered a few other trivial issues with the logic that are fixed as
well.

I added tests to cover this as it is hard to notice if you install
recent versions of the OS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144165 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
5bea4f6860543017be326e3fbe702edb2678d898 08-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Misc fixes for clang driver on Mips Linux. Patch by Simon Atanasyan.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144108 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
c44bc2d32f81d11b4c0e46c932ba42e673b50a49 08-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a default system include of '/include'. This isn't particularly
useful when using Clang as a system-compiler, but its harmless. When
using Clang as a cross-compiler, this can be very handy as quite a few
toolchains ship their libc headers here rather than under
'/usr/include'.

For reference, this is the beginning of my work to also make the Clang
driver more suitable as a cross-compiler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144089 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
cf6ba2eeaeabb03541ee98859805800c39759a47 07-Nov-2011 Chad Rosier <mcrosier@apple.com> Whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144002 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
55ccbd5fbfc6dce1b93779ba2dac0da259503ae0 07-Nov-2011 Chad Rosier <mcrosier@apple.com> Tablegenify -g options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144001 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f2db04c49429a6d53069b813d42999fa36ddd9a4 07-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Fix an unsafe use of Twine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143962 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
oolChains.cpp
eb35ffc2174f7c4d622c6e81e3a4915ef077f470 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Fix Linux libc++ usage. Somehow this slipped through during the port.

Test cases for this and all the rest of the port are still in the works,
but will wait for a fixed computer and post 3.0 merging...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143916 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b37fe61e661453800f826897706b1d75f98dd7c1 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Begin lifting some of the one-off checking logic into generic helper
routines on the base toolchain class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143900 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
19347edf7809866350750a1997ec4db009832fa4 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the GCC installation detection logic down into the Generic_GCC
toolchain. The logic is mostly generic already, and where possible
should be made more generic. Also, it has no impact other than to expose
a set of methods which each toolchain can then query to setup their
desired configuration. These should be available to toolchains beyond
just Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143899 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
089b272e6663997877138a6d274abfc537811340 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove an old OpenSUSE hack that is no longer needed -- it is exactly
the same as a directory added further down in the new logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143897 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d1f73060a9a5307fa665c2c17f82e19f959aacb5 07-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove the HasMultilib check. It was essentially useless. The driver now
looks for evidence of a multilib installation, and adds the appropriate
bits to the search paths.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143896 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7902d766dea6366b84bf65c671f1cbd7b31b9388 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> The version objects need to actually store the version strings; they
aren't guaranteed to live long enough otherwise.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143875 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
abaa1d7caf49d5e4774c3399de9329ab46de03a7 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Throw the switch and move all Linux header search over to the GCC
detection system that is providing the library paths and crt object
files.

This, modulo any bugs that need to be shaken out, resolves numerous bugs
with how we handle header paths. Here are a few that I know of:
- We no longer need to enumerate all GCC versions searched.
- OpenSUSE searched GCC versions in the wrong order.
- There were typos when selecting various patterns, etc.
- We aren't stating quite some many directories now.
- SysRoot didn't always work in a reasonable way.

I'm working on tests for this, but the tests are making me and Lit sad.
The real testing for this type of driver change is to try it out on
various distributions. I'll hit the common ones right away, and start
more thorough testing tomorrow after some sleep.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143874 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6a21e6583612462d294db8344dd45444f7d84303 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a missing triple spotted by inspecting and testing of the include
path triples. Also order the 32-bit triples a bit more reasonably.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143873 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0e29dbb96121386c2e6d03b59eebf2c329a2a578 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Lift the GCCVersion type into the header file and start persisting it in
the detected GCC installation. This allows us to expose another aspect
of what we detected: the GCC version. This will be used shortly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143871 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
fa13459725b7a8c414ddf3742ffb7eab8314388d 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Switch some of these interfaces from std::string to StringRef and Twine.
This will facilitate further use and recombinations of them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143869 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
a463089f6eb37069d406f9fb56e40810edaf523a 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Take a better approach to detecting and selecting multiarch include
directories. This way we stop at the first multiarch directory found on
the system. This achieves the real intended result of pruning
non-existent directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143866 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0170fff9f4c667fa85267420b87b2c2ba89aaf31 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Revert r143864, as the problem I was actually looking at can be solved
a better way. The more I think about it the more worried I am that this
hammer is simply too large. We should only be reaching out to the
filesystem when doing interesting "detection" things, not gratuitously.

Original commit message:
Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143865 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5ffa3eed8b1ca69e1638cffbee2e464276a1ce06 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Start pruning down the set of flags passed to CC1 for header search.
This cleans up the CC1 invocations, and reduces the overhead there.
We're still hammering the filesystem looking for the C++ standard
libraries though.

The only reservation I have about this policy is the case of virtualized
files inside of CC1, but it's not clear what the best way to solve that
is. The Driver consistently queries the actual filesystem to make its
decisions. Changing that would be a very large undertaking. It might be
worthwhile, but it's not an immediate goal.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143864 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b84575ef14b41b402f6c1222568fd595f15f2695 06-Nov-2011 David Blaikie <dblaikie@gmail.com> Fixing -g break caused by a dead reference to a temporary introduced in r143732.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
54db68bf0e389b8aabe1a434f825a81a9c1f7db8 06-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> Add the depfile as a result file so that it is deleted if we crash,
and prevent the diagnostic preprocessor run from writing a depfile.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143846 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ools.cpp
ools.h
cb2e00ff6570144efaf69a03f5d20b9e6fce4f7d 06-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Enhance the GCC version parsing and comparison logic to handle some more
edge cases and have better behavior. Specifically, we should actually
prefer the general '4.6' version string over the '4.6.1' string, as
'4.6.2' should be able to replace it without breaking rpaths or any
other place that these paths have been embedded. Debian-based
distributions are already using a path structure with symlinks to
achieve in-place upgrades for patch versions. Now our parsing reflects
this and we select the shorter paths instead of the longer paths.

A separate issue was that we would not parse a leading patch version
number even in the presence of a suffix. The above change makes this
more problematic as it would cause a suffix being added to make us treat
the entire thing as patch-version-agnostic, which it isn't. This changes
the logic to distinguish between '4.4.x' and 4.4.1-x', and retain that
the latter has *some* patch number information. Currently, we always
bias toward the shorter and more canonical version strings. If it
becomes important we can add more Debian like rules to produce sequences
such as '4.4.1b' > '4.4.1' > '4.4.1-rc3' > '4.4.1-rc2' > '4.4.1-pre5',
but I'm very doubtful this will ever matter or be desirable.

I've made the tests for this logic a bit more interesting, and added
some specific tests for logic that is now different.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143841 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
69cd4aaefe075ede31d81cbf7141d697243fb4f7 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove a pointless member. I have no idea why I made this not a local
variable to begin with... As I'm planning to add include root
information to this object, this would have caused confusion. It didn't
even *actually* hold the include root by the time we were done with it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143840 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ca28a899b3fb2a61c65d7a9f7149a6d48f56eb7d 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove a no-longer needed helper function. Thanks for implementing this
Michael!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f13b13e85bedf91bde90a2c902fed99581e70f7a 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the GCC installation detection helper a member of the Linux
toolchain instead of merely using it in the constructor. This will allow
us to query it when building include paths as well as the file search
paths built in the constructor. I've lifted as little of it as I could
into the header file.

Eventually this will likely sink down into some of the Generic
toolchains and be used on more platforms, but I'm starting on Linux so
I can work out all the APIs needed there, where it is easiest to test
and we have the most pressing need.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143838 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
258883b544bfc220b801b66a5fad416c83cd956f 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Remove support for Gentoo subversion-ebuild installed llvm-gcc libstdc++
headers. As llvm-gcc is dead, and I have no idea if this ever really
worked, I think it's time for it to go. More importantly, it makes it
harder to generalize the include search logic. If someone really wants
these to work, they can set the CPLUS_INCLUDE_PATH environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143836 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7d7e9f963a4977e36efb90fd9c369f33ced1a95a 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Move the Linux header searching from the Frontend to the Driver. This is
the first (and diff-noisiest) step to making Linux header searching
tremendously more principled and less brittle. Note that this step
should have essentially no functional impact. We still search the exact
same set of paths in the exact same order. The only change here is where
the code implementing such a search lives.

This has one obvious negative impact -- we now pass a ludicrous number
of flags to the CC1 layer. That should go away as I re-base this logic
on the logic to detect a GCC installation. I want to do this in two
phases so the bots can tell me if this step alone breaks something, and
so that the diffs of the refactoring make more sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143822 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
6fdebeef8f6067808ad5adcfbf3cf03e904d3eda 05-Nov-2011 Benjamin Kramer <benny.kra@googlemail.com> Try to reduce the nastiness that creeps in through Windows.h a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143816 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5183b3d5d5f911f1e9fd8e5d877c7fe039963e31 05-Nov-2011 Chad Rosier <mcrosier@apple.com> [driver] If we're only linking, don't warn about unused arguments which are
obviously only used during compilation.
rdar://10386708


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143813 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
oolChains.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
oolChains.cpp
79d481a08522ab031528c0047df565330c1cd562 05-Nov-2011 Peter Collingbourne <peter@pcc.me.uk> On Linux, enable the gold plugin if we are using LTO.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143778 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9cef8874ec046db3ba4784d4b2a2e608466f7d0c 05-Nov-2011 Michael J. Spencer <bigcheesegs@gmail.com> Fix MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143770 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
oolChains.cpp
ca23419b8214654d185d595956e9ddf24984750a 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Begin the migration of header search logic to the driver, starting with
Windows. There are still FIXMEs and lots of problems with this code.
Some of them will be addressed shortly by my follow-up patches, but most
are going to wait until we isolate this code and can fix it properly.
This version should be no worse than what we had before.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143752 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ab9fcd0ad3202735d5f21f15b2989d65f2747a13 05-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Switch the C++ include interface in the ToolChain to use the same naming
as the system include interface before I start adding implementations of
it to individual ToolChain implementations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143751 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.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
ools.cpp
2875bda1505bce995f745002affb20862765ed04 04-Nov-2011 Chad Rosier <mcrosier@apple.com> [driver] Don't blindly accept all -g options.
rdar://10383444


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143732 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a461442ed99883d2760833592f65e1e95a4889bb 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Sink the strange '-stdlib=...' flag handling into the C++ include
handling logic of the generic ToolChain. This flag, despite its name,
has *nothing* to do with the GCC flag '-nostdlib' that relates
(exclusively) to the linking behavior. It is a most unfortunate name in
that regard...

It is used to tell InitHeaderSearch.cpp *which* set of C++ standard
library header search paths to use -- those for libstdc++ from GCC's
installation, or those from a libc++ installation. As this logic is
hoisted out of the Frontend, and into the Driver as part of this
ToolChain, the generic method will be overridden for the platform, where
it can implement this logic directly. As such, hiding the CC1 option
passing in the generic space is a natural fit despite the odd naming.

Also, expand on the comments to clarify whats going on, and tidy up the
Tools.cpp code now that its simpler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143687 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
7ffa0325bd61f656697f99434334d425c39af309 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Sink the handling of -fobjc-arc-cxxlib to live with the other -fobjc-arc
implementation in the driver. This cleans up the signature and semantics
of the include flag adding component of the toolchain. Another step to
ready it for holding all the InitHeaderSearch logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143686 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
b5870e77a9a872e2a84e904a332bb60bbe207da9 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a FIXME to cleanup the CPATH handling. It's currently burried with
the rest of the mess in InitHeaderSearch.cpp. We could hoist it into the
driver profitably, removing more noise from the driver -> frontend
communication.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143685 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
88491fc6dfc7ebbd856d57a9acb49fb83077d6c8 04-Nov-2011 Chandler Carruth <chandlerc@gmail.com> Add a system include management interface to the toolchain, and call it
and the C++ include management routine from the proper place when
forming preprocessor options in the driver. This is the first step to
teaching the driver to manage all of the header search paths. Currently,
these methods remain just stubs in the abstract toolchain. Subsequent
patches will flesh them out with implementations for various toolchains
based on the current code in InitHeaderSearch.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143684 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
ce50c55f8cb569cc1b71770fd62327a883fdb7ba 02-Nov-2011 Chad Rosier <mcrosier@apple.com> In addition to dumping preprocessed source, dump a script with the command line
arguments that caused clang to crash.
rdar://8314451

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143573 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
591ff15d4a7ae25ea7ac3f00f04f203d3ccec0b7 02-Nov-2011 Bob Wilson <bob.wilson@apple.com> Invoke the Darwin assembler with -g instead of --gdwarf2.

The -g and --gdwarf2 options are currently synonyms to the Darwin assembler.
But clang itself does not recognize --gdwarf2, so if we want to experiment
with using clang, with its integrated assembler, to replace the default
assembler, it is necessary to use -g. <rdar://problem/10349486>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143533 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
236e0b6239c588d631b48d17b8e0174508bdc471 31-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Simplify the set of directories we look for on multiarch systems.
I don't have any Debian system with one of these currently, and it seems
unlikely for one to show up suddenly. We can add more patterns here if
they become necessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143346 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
deb73f8b9334b7b065e3ce776827e69ccb4f52cd 31-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Fix part of PR11223 and probably a few dups as well. This teaches the
library search logic to "properly" handle multiarch installations. I've
tested this on both Debian unstable and the latest Ubuntu which both use
this setup, and this appears to work largely the same way as GCC does.
It isn't exactly the same, but it is close enough and more principled in
its behavior where it differs. This should resolve any failures to find
'crt1.o' etc on Debian-based Linux distributions. If folks find more
cases where we fail, please file bugs and CC me.

Test cases for all of the debian silliness are waiting both to simplify
the process of merging these down into the 3.0 release, and because
they're so crazy I haven't yet been able to really produce a fake tree
that represents what we need to test for. I'll eventually add them
though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143344 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1a1764bd15406f86d53c51b4c7f8a54afee2a541 30-Oct-2011 Bob Wilson <bob.wilson@apple.com> Stop disabling integrated assembler with -static. <rdar://problem/10175391>

The integrated assembler seems to be working pretty well for -static code
now, so remove the hacks to disable it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143304 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
e88c4513157cc551ed8080b1e3b3b875a9a570e1 25-Oct-2011 Eric Christopher <echristo@apple.com> Allow the -fno-operator-names option to be passed down to the rest
of the compiler.

Fixes PR10198
Patch by Brian Foley!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142913 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0986eb5c59c43809df95bac10138edd44c1ebb69 25-Oct-2011 Dan Gohman <gohman@apple.com> Remove the SystemZ backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ba97b6ea0e8933ab801b0d06bba133836627794a 24-Oct-2011 Douglas Gregor <dgregor@apple.com> Have -fms-no-extensions turn off -fms-compatibility

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142798 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f634bcece396cf6d51df450729bcd976785a0109 22-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Pack struct better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142725 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
C1Options.cpp
riverOptions.cpp
813a40750f7e8cd1e09a8aa1091283224a6adf21 22-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Tools.cpp: Use PathV2::is_absolute() to add -fdebug-compilation-dir. pwd[0] might not be '/' on Win32 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142720 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
00a92abaf907802bfa4d6f38bdd242c6bfc34c09 21-Oct-2011 Logan Chien <loganchien@google.com> Merge with clang upstream Oct 20th 2011 (r142531)

Change-Id: I42181113f38ce445f2a48694d6f654438562b71e
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
ools.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
ools.cpp
c19981c2711c9b0564bc1a9cbad4b2d0cca608d5 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [driver] Make the driver to link the simulator arclite lib when passing -mios-simulator-version-min.
rdar://10218700

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142372 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
dceb11fdcf3ea657a06d2ec90a8f4b8359ab8727 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r142311, -mios-simulator-version-min does not work correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142322 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b56e6ad87feb654e4ca265311344f4467a55a810 18-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Remove the hack where we sniff the __IPHONE_OS_VERSION_MIN_REQUIRED define.

We can use -mios-simulator-version-min now. rdar://10218700

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142311 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
19706f8e702c04d19bc1ace504cbb9df008b6daa 18-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -static-libstdc++ for linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142290 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
abf3ac7131ba8eab1a2ec99397a776fb0c75ff55 17-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Implement -static-libgcc on linux and refactor the code responsible for adding
libgcc to the link line into a helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142269 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
16a63552480b137c6ef1379d2eeb866a12183bd4 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Fix a silly bug introduced in r142133.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142134 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7a09d012f6d52c8a7ba257df85d13149e6aa7cb2 16-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Clean up some cruft in the library path searching logic by making
'libdir' mean the actual library directory, not the GCC subdirectory of
the library directory. That was just a confusing pattern. Instead,
supply proper GCC subdirectories when scanning for various triple-based
subdirectories with a GCC installation in them. This also makes it much
more obvious how multiarch installations, which have a triple-based
prefix as well as suffix work.

Also clean up our handling of these triple-prefixed trees by using them
in both a multiarch pattern and a non-multiarch pattern whenever they
exist.

Note that this *does not* match what GCC does on Debian, the only truly
multiarch installation I've been able to get installed and test on. GCC
appears to have a bug, and ends up searching paths like
'/lib/../../lib32' which makes no sense what-so-ever. Instead, I've
tried to encode the rational logic that seems clearly intended by GCC's
pattern. GCC ends up with patterns like:

/lib/../../lib32
/usr/lib/../../lib32
/usr/lib/x86_64-linux-gnu/../..lib32

Only the last one makes any sense having a '/../..' in it, so in Clang,
that's the only one which gets a '/../..' in it.

I *think* this will fix Debian multiarch links. I'm committing without
baking this logic into our test suite so I can test on a few different
systems. If all goes well (and no one screams) I'll check in some more
comprehensive tests for multiarch behavior tomorrow.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142133 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f886d6f5ec01e521afc39e967f9ff614c4e1c8e7 14-Oct-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix the CXX_INCLUDE_ROOT case that was out of date with ScanLibDirForGCCTriple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141980 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
905c45f15a25598620d19160c139c6b785aeea89 14-Oct-2011 Bob Wilson <bob.wilson@apple.com> Use Triple.isOSDarwin() instead of comparing against Triple::Darwin.

There are now separate Triple::MacOSX and Triple::IOS values for the OS
so comparing against Triple::Darwin will fail to match those. Note that
I changed the expected output for the Driver/rewrite-objc.m test, which had
previously not been passing Darwin-specific options with the macosx triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141944 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
575fdda948e07c1afc6fcdced9e5cf0b7905a54e 14-Oct-2011 Richard Smith <richard-llvm@metafoo.co.uk> Rename -Wc++0x-compat, -Wc++0x-extensions and -Wc++0x-narrowing from c++0x to
c++11. The old names are kept for backwards-compatibility. Patch by Ahmed
Charles! Names for backwards-compatible DiagGroups removed by me.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141913 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
84cbd4b0a924b3a741bab88c0dd4fd16f3f14b68 13-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Add triple for RHEL 5 to the libpath collecting logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141887 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d596c4d3f8931f4d479e965bf46d0e7edad85570 12-Oct-2011 Douglas Gregor <dgregor@apple.com> The Objective-C rewriter uses the fragile ABI, always.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141795 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
92d6d404833468120f9a86fb360691ac60585551 11-Oct-2011 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a new -nostdlibinc option.
- This disables the system include directories, but not the compiler builtin
directories. Useful for projects that want to use things like the intrinsic
headers, but are otherwise freestanding.

- I'm willing to reconsider the option naming, I also considered providing an
explicit -builtinc (which would match -nobuiltininc), but this is more
consistent with existing options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141692 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
8642f21ca7b5963293a5424de7fe158305ae5229 10-Oct-2011 Roman Divacky <rdivacky@freebsd.org> Link in Scrt1.o instead of crt1.o when -pie is specified.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141573 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
30aa95140a1bc19e3e57795c788fb5b4f5921ad7 10-Oct-2011 Bob Wilson <bob.wilson@apple.com> Partially revert r141374: allow use of libc++ prior to Mac OS X 10.7.

Apple only supports libc++ on OS X 10.7 and later but for the open-source
compiler that restriction doesn't make sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141566 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ypes.cpp
96e21710e8bf64514ca7d3720cb3b2823eec9164 08-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix "Uninitialized" warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141487 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a789ca9b967abe47b84df83bcf4afb150856a8d9 08-Oct-2011 NAKAMURA Takumi <geek4civic@gmail.com> Whitespace

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141486 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
228971738f80de6f02aee0d6f8018f5209cf7c9c 08-Oct-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Ignore linking errors when doing ARC migration, rdar://10247606

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141434 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
163b151809beef8f917fd16c546016e83ae3e361 07-Oct-2011 Bob Wilson <bob.wilson@apple.com> Clang driver changes for iOS 5.0 and OS X Lion support.

Check whether the libc++ library is available when using -stdlib=libc++,
and also adjust the check for whether to link with -lgcc_s.1.
Patch by Ted Kremenek and Daniel Dunbar.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141374 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ae1aee6683d486d1c92e51b2a5da6ba75f633308 07-Oct-2011 Chad Rosier <mcrosier@apple.com> More cleanup using StringSwitch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141373 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a59956b473b76af6a9d999ab1780ef74cfed4667 07-Oct-2011 Bob Wilson <bob.wilson@apple.com> Use StringSwitch. Thanks for Chandler for the suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141344 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5f22614327065a4ae78588eda8cb62f8b50502aa 07-Oct-2011 Benjamin Kramer <benny.kra@googlemail.com> Use strpbrk(3) instead of open coding it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141328 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
fd22cce762c875178f491a8db0050b9cbfe4429f 06-Oct-2011 Bob Wilson <bob.wilson@apple.com> Remove DISABLE_ARM_DARWIN_USE_MOVT ifdefs. Radar 9456730.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141320 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c627146b3785fed3f27114ec5ab5dd4e0376602 06-Oct-2011 Bob Wilson <bob.wilson@apple.com> Rearrange for readability. No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141309 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
169a6e0bc415770b7cdb90e9777a42f106b8cd24 06-Oct-2011 Bob Wilson <bob.wilson@apple.com> Add a missing check for cortex-a9.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141308 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
08f35a79f7506d6ac0349764aa4d6021a1e1c6e2 06-Oct-2011 Ivan Krasin <krasin@chromium.org> Add -Wlanguage-extension-token option for ext_token_used warning.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141268 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
22807868ad852806fd19e005945a910d3e9ab9ef 05-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] For consistency, handle all shell special characters handled by the
quoting code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141205 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
a2dd7d08a3665ba75d3d17b06a0dcc11570c9575 05-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] The -v option doesn't quoted the command line arguments for historical
reasons. However, it does seems practical to quote strings that need it.
rdar://10221951


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141202 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
1203600d227aefa1600973dd848417d31751a3a2 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Use the InstalledDir correctly, and test it correctly as well. =/ Should
have noticed this previously, sorry.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141167 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
dbc2144408c1bbc643a9362225aea8a050b444a7 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Teach Clang to cope with GCC installations that have unusual patch
"versions". Currently, these are just dropped on the floor, A concrete
version number will always win out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141159 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5058e3a18c5f305d7ff21ba1e9e1439701d40e0b 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Implement the feature I was originally driving toward when I started
this saga. Teach the driver to detect a GCC installed along side Clang
using the existing InstalledDir support in the Clang driver. This makes
a lot of Clang's behavior more automatic when it is installed along side
GCC.

Also include the first test cases (more to come, honest) which test both
the install directory behavior, and the version sorting behavior to show
that we're actually searching for the best candidate GCC installation
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141145 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e089088b4ae51a1b7e1803739660c6039505dfee 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Hoist the other messy part out of an inner loop and into a helper
function, cleaning up along the way.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141134 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4c9403c57e4a867c58903546af5826df56a83980 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Hoist the first chunk of this into a helper function. No functionality
change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141131 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
43f7e62442f17a2527f6eed387c86b38ffd5dc2a 05-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] Improve r141053 by only emitting the warning if the original input
was assembly. Otherwise, something like -save-temps causes the integrated
assembler to warn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141127 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
74410686903d0effda6eb1ef88bc570bc240ba19 05-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Fix Windows+MinGW which introduces noise into path separators.

There should be a better solution to this; Michael and I are continuing
to discuss exactly what it should be. The one solution I'm very
uncomfortable with is making the FileCheck tests use a regex for each
path separator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141126 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6ab8e6231f75500ea4d0c7755032ffc98e71a25f 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Now that multiple prefixes are much cheaper to search for GCC
installations, support them when installed directly under the system
root ('/lib/gcc/...' essentially).

With this, Clang can correctly detect and use a cross-compiling GCC
installation within a system root and use it.

Again, test cases will be coming in later commits, as I'm going to write
a few test cases that exercise nearly all of this logic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141121 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6d9694cf46af57a28b371bd964b7f6bcafd7d961 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Rework the search for a GCC installation still further. This combines
two fundamental changes, as they ended up being interrelated.

The first is to walk from the root down through the filesystem so that
we prune subtrees which do not exist early. This greatly reduces the
filesystem traffic of this routine. We store the "best" GCC version we
encounter, and look at all of the GCC installations available.

Also, we look through GCC versions by scanning the directory rather than
using a hard-coded list of versions. This has several benefits. It makes
it much more efficient to locate a GCC installation even in the presence
of a large number of different options by simply reading the directory
once. It also future-proofs us as new GCC versions are released and
installed. We no longer have a hard coded list of version numbers, and
won't need to manually updated it. We can still filter out known-bad
versions as needed. Currently I've left in filtering for all GCC
installations prior to 4.1.1, as that was the first one supported
previously.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141120 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c916377785b917e369b8ec9e9af43a4bb6c4699c 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Add a comment explaining that I have a better plan for implementing the
GCC installation search that requires fewer filesystem operations.
Planning to implement that next as the current approcah while thorough
(and so far looks correct) does a very unfortunate number of filesystem
operations.

I'm motivated to fix this in no small part because I would like to
support a much larger space of triples and GCC versions, which would
explode the current algorithm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141073 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a24b9802d3009c448387174f70bcd9ab44b8a7ea 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Invert the loop for detecting installed GCC trees. This make the loop
find the newest GCC available, among other goodness. It makes the entire
system much less prone to error from prefixes and/or system roots
pruning early the set of triples and GCC versions available.

Also, improve some comments and simplify the forms of some of the loops.

This causes the driver to stat directories more often than is strictly
necessary, but the alternatives which I looked at that still
accomplished this goal needed quite a bit more code and were likely not
much faster.

Test cases for this, now that our behavior here is significantly more
principled and predictable, should come tomorrow as I walk back through
VMs looking for edge cases that are missed after this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141072 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
810e08126fc5d270976e5513baa1810882301bb0 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Fuse the two halves of the GCC installation detection. This is
significantly cleaner (IMO) and more principled. We now walk down each
layer of the directory hierarchy searching for the GCC install. This
change does in fact introduce a significant behavior change in theory,
although in practice I don't know of any distro that will be impacted by
it negatively, and Debian may (untested) get slightly better through it.

Specifically, the logic now looks exhaustively for patterns such as:

/usr/lib/<triple>/gcc/<triple>

Previously, this would only be selected if there was *also*
a '/usr/lib/gcc/<triple>' directory, or if '<triple>' were the excat
DefaultHostTriple in the driver.

There is a 4-deep nested loop here, but it doesn't do terribly many
filesystem operations, as we skip at each layer of that layer's
directory doesn't exist.

There remains a significant FIXME in this logic: it would be much better
to first build up a set of candidate components for each of the four
layers with a bottom-up pruning such as this, but then select the final
installation using a top-down algorithm in order to find the newest GCC
installation available, regardless of which particular path leads to it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141071 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
10a82cde7c317c5dd41dc3faf17f503c52ce2a3d 04-Oct-2011 Bob Wilson <bob.wilson@apple.com> Rip out flags for controlling C++ "production mode" separately.

This is old leftover cruft from the days when C++ was not yet ready
for prime time.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141063 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
adc4afb4a56e0905753d4ef7a3491f2c0097d80a 04-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Factor the data apart from the logic of locating various GCC
installations. This first selects a set of prefixes and a set of
compatible triples for the current architecture. Once selected, we drive
the search with a single piece of code.

This code isn't particularly efficient as it stands, but its only
executed once. I'm hoping as I clean up the users of this information,
it will also slowly become both cleaner and more efficient.

This also changes the behavior slightly. Previously, we had an ad-hoc
list of prefixes and triples, and we only looked for some triples
beneath specific prefixes and vice versa. This has led to lots of
one-off patches to support triple X, or support lib dir Y. Even without
going to a fully universal driver, we can do better here. This patch
makes us always look first in either 'lib32' or 'lib64' on 32- or 64-bit
hosts (resp.). However, we *always* look in 'lib'.

Currently I have one lingering problem with this strategy. We might find
a newer or better GCC version under a different (but equally compatible)
triple. Fundamentally, this loop needs to be fused with the one below.
That's my next patch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141056 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d0790b8a0687f5874bc46fc298133a8b070fb667 04-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] Improve r141053 by only emitting the warning if the original input
was assembly. Otherwise, something like -save-temps causes the integrated
assembler to warn.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141055 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
968b7a71c88bcd157f7d271517d7ceb266fed63a 04-Oct-2011 Chad Rosier <mcrosier@apple.com> [driver] Emit a warning if the user has requested debug information and we're
using the integrated assembler.
rdar://10216353

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141053 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
048e6490704d0a4e095e033786230c584b52d82c 03-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Refactor the detection of a GCC installation into a helper class. This
is designed to allow the detection to record more rich information about
the installation than just a single path.

Mostly, the functionality remains the same. This is primarily
a factoring change. However, the new factoring immediately fixes one
issue where on ubuntu we didn't walk up enough layers to reach the
parent lib path. I'll have a test tree for that once I finish making the
Ubuntu tree work reasonably.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141011 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
38ec546a56a267320f8f6c86141a7b0f7d6493c4 03-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Enable generic multilib support on 32bit hosts. Previously this was only
enabled for debian hosts, which is quite odd. I think all restriction on
when Clang attempts to use a multilib installation should go away. Clang
is fundamentally a cross compiler. It behaves more like GCC when built
as a cross compiler, and so it should just use multilib installs when
they are present on the system. However, there is a very specific
exemption for Exherbo, which I can't test on, so I'm leaving that in
place.

With this, check in a generic test tree for multilib on a 32-bit host.
This stubs out many directories that most distributions don't use but
that uptsream GCC supports. This is intended to be an agnostic test that
the driver behaves properly compared with the GCC driver it aims for
compatibility with.

Also, fix a bug in the driver that this testing exposed (see!) where it
was incorrectly testing the target architecture rather than the host
architecture.

If anyone is having trouble with the tree-structure stubs I'm creating
to test this, let me know and I can revisit the design. I chose this
over (for example) a tar-ball in order to make tests run faster at the
small, hopefully amortized VCS cost.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140999 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
663abc976af682b9426918b3c534d132a2b09a64 03-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Teach the logic for locating an installed GCC about the system root.
This requires fixing a latent bug -- if we used the default host triple
instead of an autodetected triple to locate GCC's installation, we
didn't go back and fix the GCC triple. Correct that with a pile of
hacks. This entire routine needs a major refactoring which I'm saving
for a subsequent commit. Essentially, the detection of the GCC triple
should be hoisted into the same routine as we locate the GCC
installation: the first is intrinsically tied to the latter. Then the
routine will just return the triple and base directory.

Also start to bring the rest of the library search path logic under
test, including locating crtbegin.o. Still need to test the multilib and
other behaviors, but there are also bugs in the way of that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140995 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
fde8d14ea3061ff82e9dfddb23f17648c103eae6 03-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Add initial support for applying the sysroot to library search paths.
This is still very much a WIP, but sysroot was completely broken before
this so we are moving closer to correctness.

The crux of this is that 'ld' (on Linux, the only place I'm touching
here) doesn't apply the sysroot to any flags given to it. Instead, the
driver must translate all the paths it adds to the link step with the
system root. This is easily observed by building a GCC that supports
sysroot, and checking its driver output.

This patch just fixes the non-multilib library search paths. We should
also use this in many other places, but first things first.

This also allows us to make the Linux 'ld' test independent of the host
system. This in turn will allow me to check in test tree configurations
based on various different distro's configuration. Again, WIP.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140990 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d2deee17ade564dc9ab672c4ae8d7d4c2002d507 03-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Rework the selection of builtin library search paths on Linux to
precisely match the pattern and logic used by the GCC driver on Linux as
of a recent SVN checkout.

This happens to follow a *much* more principled approach. There is
a strict hierarchy of paths examined, first with multilib-suffixing,
second without such suffixing. Any and all of these directories which
exist will be added to the library search path when using GCC.

There were many places where Clang followed different paths, omitted
critical entries, and worst of all (in terms of challenges to debugging)
got the entries in a subtly wrong order.

If this breaks Clang on a distro you use, please let me know, and I'll
work with you to figure out what is needed to work on that distro. I've
checked the behavior of the latest release of Ubuntu, OpenSUSE, Fedora,
and Gentoo. I'll be testing it on those as well as Debian stable and
unstable and ArchLinux. I may even dig out a Slackware install.

No real regression tests yet, those will follow once I add enough
support for sysroot to simulate various distro layouts in the testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140981 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a9402e4b433d79037fabe96fd6ca2a890d47f426 02-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Simplify this through the power of the ternary operator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140965 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
bc0df7240851f46f07c1a356aa7d1aee26115c31 02-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Consolidate the currently bizarre 32/64 multilib selection logic a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140964 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
eb86b5b039230f5bf7f5bebdc345bf6843410425 01-Oct-2011 Chandler Carruth <chandlerc@gmail.com> Revert r140604: "Let -B work for ld paths on Linux."

This patch may do what it describes, it may not. It's hard to tell as
its completely unclear what this is supposed to do. There are also no
test cases. More importantly, this seems to have broken lots of linker
invocations on multilib Linux systems.

The manual pages for 'ld' on Linux mention translating a '=' at the
beginning of the path into a *configure time* sysroot prefix (this is,
I believe, distinct from the --sysroot flag which 'ld' also can
support). I tested this with a normal binutils 'ld', a binutils 'ld'
with the sysroot flag enabled, and gold with the sysroot flag enabled,
and all of them try to open the path '=/lib/../lib32', No translation
occurs.

I think at the very least inserting an '=' needs to be conditioned on
some indication that it is supported and desired. I'm also curious to
see what toolchain and whan environment cause it to actually make
a difference.

I'm going to add a test case for basic sanity of Linux 'ld' invocations
from Clang in a follow-up commit that would have caught this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140908 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
26e0b304557519c12b150afe23cd24e28fa20a1d 30-Sep-2011 Daniel Dunbar <daniel@zuster.org> Revert my --working-directory option, which wasn't well thought through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140889 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3c3ccd283f8c35dbb200a76eacfa17f7861e03bb 30-Sep-2011 David Chisnall <csdavec@swan.ac.uk> Remove the conditional that avoided passing the Objective-C runtime specification flags to cc1. This fixes PR10369 (__builtin_NSStringMakeConstantString() selecting the wrong runtime in C / C++ code and crashing, although it doesn't fix the problem that instantiating the Mac runtime for non-Darwin targets was crashing.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140853 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a95b9f6dab394fea8378702e1a3d06e3cdfdc9c4 29-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Driver: use correct search paths for multilib

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140782 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7ca268423c400ef0109d2b8b29717a83f87e0f3e 28-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Driver: Fix two bad typos that were breaking the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140682 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
4f8de278b73f438f1911128ae9c8ce27c2b53546 28-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] If no OSX or iOS target has been specified and we're compiling for
armv7, go ahead as assume we're targeting iOS.
rdar://10147774

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140668 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5adcec16cb8d9e7bebf310b6c07249dfd852346b 28-Sep-2011 David Chisnall <csdavec@swan.ac.uk> Check for GCC paths that have the target triple in them. This is required for a lot of cross-compile toolchains. Also add some slightly better support for -B.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140645 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.cpp
7f9b58b171ea24a5ed14dddb43fe057abcad0ece 27-Sep-2011 David Chisnall <csdavec@swan.ac.uk> Let -B work for ld paths on Linux.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140604 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9f36062866e6e4bbbfd3efce85fcfb1ce62df97f 26-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Make necessary changes in AddMIPSTargetArgs for targeting Mips64. Enable use of
-mcpu.







git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140562 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
rgList.cpp
river.cpp
51be75eccd920c06fc3033444c9d37e78d3cb4a5 24-Sep-2011 Daniel Dunbar <daniel@zuster.org> Driver: Use sys::Process::SetWorkingDirectory, for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140434 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5cca4eb629c2ae96f3a9251512883285fe0f270c 23-Sep-2011 Benjamin Kramer <benny.kra@googlemail.com> Driver: Explicitly include <unistd.h>, libstdc++'s <map> pulls it in, libc++ doesn't.

Also, on windows, chdir seems to live in <direct.h>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140414 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
63bc59bf22b8f2e672fcf3904fe33993f69e006f 23-Sep-2011 Daniel Dunbar <daniel@zuster.org> Driver: Add a --working-directory option which can be used to cause the compiler
to operate "as if" in a certain working directory.
- For now, we just implement this by changing the actual working directory, but
eventually we would want to handle this transparently. This is useful to
avoid an extra exec() pair in some situations, and will be something we would
want to support for more flexibility in using the Clang libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140409 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
eb2d1f1c88836bd5382e5d7aa8f6b85148a88b27 23-Sep-2011 David Blaikie <dblaikie@gmail.com> Removing a bunch of dead returns/breaks after llvm_unreachables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140407 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
ption.cpp
hases.cpp
548f6c8e8010b181cb151df92f0a989363cb993e 23-Sep-2011 David Blaikie <dblaikie@gmail.com> More missing header inclusions from llvm_unreachable migration.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140369 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
ptTable.cpp
ption.cpp
hases.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
ction.cpp
river.cpp
ptTable.cpp
ption.cpp
hases.cpp
oolChains.cpp
ools.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
ools.cpp
7ec0258505a11e7e8229d2c96507be6bbc40d7c1 21-Sep-2011 Akira Hatanaka <ahatanak@gmail.com> Add case labels for Mips64 architectures.





git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140226 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8aa76ea4472349e081d046f7b21dc1e54014f335 21-Sep-2011 Bob Wilson <bob.wilson@apple.com> For i386 kext fallback to llvm-gcc, search paths for several Darwin versions.

This replaces the hack to read UNAME_RELEASE from the environment when
identifying the OS version on Darwin, and it's more flexible. It's also
horribly ugly, but at least this consolidates the ugliness to touch less of
the code so that it will be easier to rip out later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140187 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
61ab80a8b35e6fe9363e8ef1b3d27209b0e89349 20-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] Default to arm mode when using the integrated assembler.
rdar://10125227

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140179 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.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
ools.cpp
9bdbec17c3bc44aaa5ea88c62a958d47d1031016 17-Sep-2011 Douglas Gregor <dgregor@apple.com> Pass -fmodule-cache-path along to -cc1 properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139977 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
733a83b324dc31ac5be3f30f4d05febad0728474 16-Sep-2011 Eli Friedman <eli.friedman@gmail.com> Fix search paths for Ubuntu 11.04 x86. Patch by Stepan Dyatkovskiy.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139941 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
8ee51ef211bfed9ce04bc93835e19aee014f2fae 14-Sep-2011 Douglas Gregor <dgregor@apple.com> Teach the driver to always pass down a module cache path. If none is
supplied, use something derived from the system's temporary
directory. Depends on LLVM r139725.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139726 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
815eb6b80739ffca9879b9833208932dee55d0cb 14-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] Add support for the COMPILER_PATH environment variable, which adds the
specified path(s) to the list of prefix directories.
rdar://10097714

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139677 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
oolChains.cpp
oolChains.h
ools.cpp
4fe4d73bce7aba5446dcbfa36ee8782c6d496710 08-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] i386 kext preprocessor jobs also need their unsupported options
filtered. This happenis when -save-temps is specified.
<rdar://problem/10088387>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139269 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
46e3908af1ba2af6d7497e8e501f5c9a01acde7e 07-Sep-2011 Chad Rosier <mcrosier@apple.com> [driver] When clang crashes, don't try to generate diagnostics (i.e.,
preprocessor output) with multiple -arch options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139207 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
41ee7a371780d45f43251ee68542b8a9f0cd0fba 06-Sep-2011 Peter Collingbourne <peter@pcc.me.uk> Add the resource directory to the search path for Driver::GetFilePath,
as well as the search path printed by -print-search-dirs.

The main purpose of this change is to cause -print-file-name=include
to print the path to the include directory under Clang's resource
directory, instead of the system compiler's include directory, whose
header files Clang may not be able to parse. Some build scripts will
do something like:
$(CC) -nostdinc -I`$(CC) -print-file-name=include`
to exclude all header paths except the compiler's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139127 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e3685fd4c2546cfd450de6484ed4125adc1476c0 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> default property synthesis is off by default
for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138958 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
4a04247099d51321be99cf3f06bb872b3c5757fa 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: Make auto synthesis of properties the default.
This concludes //rdar://8843851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138947 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
8efcc0184a6dfe1ea799d3a6b9c1312ef1fac11d 01-Sep-2011 Francois Pichet <pichet2000@gmail.com> Enable -fdelayed-template-parsing by default on Win32.
I had to force -fno-delayed-template-parsing on some Index tests because delayed template parsing will change the output of some tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138942 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ab784085b774169cac0850a7e3151be97beb8399 01-Sep-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix PR10744 by adding the toolchain path to the regular program path
and doing a simple search. Before we would manually check for the linker
before the -B options were searched.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138941 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
104087b59d44267ecc70c6ec2c312adb6e94db54 01-Sep-2011 Hans Wennborg <hans@hanshq.net> Add 4.4.6 to GccVersions[] in lib/Driver/ToolChains.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138940 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8697d308c1bdd50e5c45757ac11be701c26e9e97 01-Sep-2011 Fariborz Jahanian <fjahanian@apple.com> objective-c: this patch (re)introduces objective-c's default property
synthesis. This new feature is currently placed under
-fobjc-default-synthesize-properties option
and is off by default pending further testing.
It will become the default feature soon.
// rdar://8843851


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138913 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a488497c7c273ba54ce0fc4caf0f4d24adb2be89 31-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] If no -miphoneos-version-min is specified on the command line *and*
IPHONEOS_DEPLOYMENT_TARGET if undefined, set -miphoneos-version-min based on
isysroot.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138892 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b1f2f4782097ed5e0a760598cbb853864cf9d7ce 29-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Some minor updates to the Linux search path handling for Slackware. Patch by Will Dietz. PR10692.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138753 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f43b5e84aa982afacd87a225440ec88a9b66c1a0 27-Aug-2011 Chad Rosier <mcrosier@apple.com> Cleanup r138662 per Ben and David's suggestions, thanks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138670 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ee99c8191cc0d9778d733da51be2f52c7b732d76 26-Aug-2011 Chad Rosier <mcrosier@apple.com> Make sure the std::string isn't deallocated prior to use. Many thanks to Eli
for catching this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138666 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
fe87fc73c0091a8d6ba04b7e3b5f144d4a0517a3 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] When generating temporary files allow a prefix to be added. In many
cases we want the prefix to be the original file name less the suffix. For an
input such as test.c to named temporary would be something like test-3O4Clq.o
Part of <rdar://problem/8314451>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138662 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
807179763b87a24de26b3c89e7ae9e898bab420c 26-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Remove a few more options when clang invokes cc1plus for i386 kexts.
<rdar://problem/10027287>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138637 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f59f5dab08d157951369171eb91ed4d614b6bc4f 26-Aug-2011 Chad Rosier <mcrosier@apple.com> Take 2: Actually fix spacing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138617 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
669cffa41a8789840e7c3a9875aa5ef8c03f43ea 26-Aug-2011 Chad Rosier <mcrosier@apple.com> 80-column.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138614 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
805bc1f6fb9b7bc85222d0211761a8c624f2dd75 26-Aug-2011 Francois Pichet <pichet2000@gmail.com> revert 138610, accidental commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138611 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0bb39319cf0c53554caa669b883d7130d39b04c7 26-Aug-2011 Francois Pichet <pichet2000@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138610 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fab83b5e7cb9507c7775edb93ed84758df132285 25-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Do not add -kext to the link command line when compiling with
-fapple-kext.
Fixes <rdar://problem/10013310>. Reverts <rdar://problem/7809940>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138564 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f857186fd1995b34185d063a29b11ad4f948519f 23-Aug-2011 Eric Christopher <echristo@apple.com> Add support for a verifier to the driver. Currently only verifies debug
output on darwin so is hard coded there.

As a note this will need a little bit of refactoring in the class
hierarchy to separate it out for different verifiers based on input type.

Fixes rdar://8256258.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138343 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
oolChains.cpp
ools.cpp
ools.h
2fef11164cbe804f7b808c07757c6f900c08d765 23-Aug-2011 Nico Weber <nicolasweber@gmx.de> enable -fstack-protector on 10.5 for usermode binaries by default.

This matches gcc's behavior.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138324 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
6b0baf97dc8fcf07519af0471309dba93222b07f 20-Aug-2011 Chad Rosier <mcrosier@apple.com> Typo spotted by Ivan Krasin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138200 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
88b7cf00fcb582728c642da3927c59468efaf926 19-Aug-2011 Eric Christopher <echristo@apple.com> Add a completely hacky workaround for pch kext files with different extensions
when falling back to cc1plus for our compile.

rdar://9963920


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138017 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8722a5d48340659c98c79af820b9088a64ef0303 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Use StringRef, rather than C string APIs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137958 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7e9e74b0cc298f206dcb173bd056da8556010202 18-Aug-2011 Chad Rosier <mcrosier@apple.com> No seriously, remove the unsupported warning options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137918 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f01f8474e2ae14bba4855f20dcc59f3a8e23d730 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix off by one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137915 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
04225c1409d1cc9fe0aca758ab0b6f1d213ce267 18-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Implement in a more table-like manner and add many more warning options
that aren't handled by llvm-gcc on fallback.
Enhancement to rdar://9964354



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137912 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
81ae90200aa11be15ec12e9639bd82a3798b8e07 18-Aug-2011 Eric Christopher <echristo@apple.com> Add some more options that aren't handled by llvm-gcc on fallback.

This is going to be made a table.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137907 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
90c88023fd4cb709c8645aa24e9eac420f733b5d 18-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Don't generate diagnostics (i.e., preprocessed source) if reading
from stdin. This allows Eli and the like to continue with their debugging
trickery without loss of limb (or car) on my part. :)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137906 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3060178ad9df29789505c1e6debcfc80a3a13587 18-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix else style. No functionality change intended.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137896 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
ools.cpp
59f9b26bcb59bfb4d66c6ea129172795dcd1cb6b 18-Aug-2011 Eric Christopher <echristo@apple.com> Fix typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137893 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cc0de8c08128023544dd0c9c7ee67b105fed2985 17-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix iterator end for r137842.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137849 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
285f9a284704c07cd50e4597408d5f93518cd7c3 17-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Clang doesn't support -mkernel/-fapple-kext for i386, so it's
automatically invoking llvm-gcc's cc1plus, which doesn't support all options
supported by Clang. Therefore, filter out unsupported options.
rdar://9964354


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137842 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
cb6239ae97f5ec791f288a284cbec6b8861886b6 17-Aug-2011 Eli Friedman <eli.friedman@gmail.com> Add additional path to Linux toolchain. Patch by Will Dietz. PR10690.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
faef9fcb41cff7c2cbafb86d3af47c422ddf3010 15-Aug-2011 Bob Wilson <bob.wilson@apple.com> Make -findirect-virtual-calls and -fterminated-vtables aliases of -fapple-kext.
Outside the driver, they were already treated that way, but the driver was not
giving them the same special treatment as -fapple-kext, e.g., falling back to
llvm-gcc for i386/Darwin kexts. Radar 9868422.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137639 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0ac1ccc0f0bc27aa87438f57466766b0ca5ae0b2 15-Aug-2011 Bob Wilson <bob.wilson@apple.com> Remove duplicate option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137638 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
57c43a29f5455ba5876f61e726ad622807412785 14-Aug-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix "Uninitialized" warnings on g++-4.4.

In fact, they are false warnings but it seems g++-4.4 might be unable to know they must be false.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137568 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a544aeece3e16296bdbbc9ee32053fac9616f85b 14-Aug-2011 Bob Wilson <bob.wilson@apple.com> Reject -mkernel for i386/Darwin C++ code; fall back to llvm-gcc instead.
Since -mkernel implies -fapple-kext, this just extends the current behavior
for -fapple-kext to apply for -mkernel as well. Radar 9933387.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137566 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
cc52a0688f46cd04dd6b4670b304cbe82e3018c0 14-Aug-2011 Nico Weber <nicolasweber@gmx.de> Add support of -x objc-cpp-output, -x objc++-cpp-output to the Driver.

Matches gcc, and is also required for using ccache with clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137563 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ypes.cpp
b18d503bc939281d8ea0dacea44e847297b92e8d 13-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Make sure to update the iterator end when erasing for Args.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137539 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
137a20b5f9360311dd0b6d2500e3365ab2cdf40e 13-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] When generating clang failure diagnostics, don't try to preprocess
inputs that aren't preprocessable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137532 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
20fd8674836a4c71cc8455d1a7541ddb864345e8 13-Aug-2011 Chad Rosier <mcrosier@apple.com> Return the proper type for objects when given a .o extension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137531 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
be69f6092668b0586c8729855c01ca2eea22e6fe 13-Aug-2011 Chad Rosier <mcrosier@apple.com> [driver] Refactor a bit to enable a few fixes when generating diagnostics. No functional change intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137524 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
98fdfd30c9f640d220aaf4e88c0e9a7dfa337c06 09-Aug-2011 Chad Rosier <mcrosier@apple.com> If no -miphoneos-version-min specified, see if we can set the default based on
-isysroot.
rdar://9837120

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137075 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
aec8f4538dfc4fbe9dca92db63688b84f8f0c2a1 08-Aug-2011 Chad Rosier <mcrosier@apple.com> Improved efficiency by using iterator returned by erase, rather then restarting.
Thanks to David Blaikie for pointing this out.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137051 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
fc6142779f42058b4a39a29b6209a01a6de9fe7c 02-Aug-2011 Chad Rosier <mcrosier@apple.com> Fix cmake for r136702 (at least for the most part). Chandler has been kind
enough to offer to investigate the underlying issue. Thanks to Doug for his
assistance as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136719 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4068eaaec44346a5866dcf3e5e4204ca82134e53 02-Aug-2011 Chad Rosier <mcrosier@apple.com> Temporarily revert parts of r136702 to make cmake builds happy.
Someone with more cmake experience want to throw me a bone? :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136709 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2b81910618f63e4ce2373c926a26e76b4b91373f 02-Aug-2011 Chad Rosier <mcrosier@apple.com> When the compiler crashes, the compiler driver now produces diagnostic
information including the fully preprocessed source file(s) and command line
arguments. The developer is asked to attach this diagnostic information to a
bug report.
rdar://9575623


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136702 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
ob.cpp
ools.cpp
8c221b84caff1f10ef4aad5c6ff77d36633f607c 01-Aug-2011 Chad Rosier <mcrosier@apple.com> Driver: When compiling i386 -fapple-kext code, we fallback to llvmgcc.
Unfortunately, llvmgcc doesn't always work when writing temporary output to
/dev/null. Therefore, create a temp file that is later deleted.
rdar://9837692

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136644 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
1fc1de48cdf9a2f241e0f2c7b9e9db2322f1b794 28-Jul-2011 Chad Rosier <mcrosier@apple.com> The -fapple-kext flag was designed to "do the right thing" for building code for
use in KEXTs. However, users/Xcode still need to tweak the linker flags to do
the right thing, and end up using -Xlinker, for example. Instead, have the
driver "do the right thing" when linking when -fapple-kext is present on the
command line, and we should have Xcode use -fapple-kext instead of setting other
flags like -Xlinker -kext or -nodefaultlibs.
rdar://7809940

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136294 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2d3ba4f5a923a90c3fc290ddfba5e36c2d0a9b46 23-Jul-2011 Chris Lattner <sabre@nondot.org> Move ArrayRef to LLVM.h and eliminate now-redundant qualifiers, patch by Jon Mulder!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135855 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1c3199afb8aeab5f4dfcef60999d13d9c6877a67 23-Jul-2011 Francois Pichet <pichet2000@gmail.com> Unbreak the MSVC build, using namespace clang is required otherwise MSVC will not find raw_ostream.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135853 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.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
rgList.cpp
ompilation.cpp
river.cpp
ptTable.cpp
oolChain.cpp
oolChains.cpp
ools.cpp
19d9d2ebbed9164e3f3a20fa065a26585c990a2e 22-Jul-2011 Rafael Espindola <rafael.espindola@gmail.com> Avoid warning on "clang -c -Dfoo test.i". Lines like these are created
when using ccache and libtool.m4 assumes that the compiler cannot print
warnings about options it knows about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135723 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d7a3ba03f69892aac02e0771eb2e6d1b7b1d1267 20-Jul-2011 Chad Rosier <mcrosier@apple.com> Temporarily revert r135614 while I fix the cmake build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135621 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
ob.cpp
ools.cpp
2da13b15959365df7edf1ed12a049b599b39c276 20-Jul-2011 Chad Rosier <mcrosier@apple.com> When the compiler crashes, the compiler driver now produces diagnostic information
including the fully preprocessed source file(s) and command line arguments. The
developer is asked to attach this diagnostic information to a bug report.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135614 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
ob.cpp
ools.cpp
c57114ab9f8e4c2d680f43a95fe23b13f446b723 20-Jul-2011 Chad Rosier <mcrosier@apple.com> If -ccc-host-triple i386-pc-win32-macho or -ccc-host-triple
x86_64-pc-win32-macho is used in conjunction with -no-integrated-as go ahead and
use the Darwin system assembler.
rdar://9785470


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135604 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9d102547dc44d064b40473a5a5166a8bb0dec99a 20-Jul-2011 Logan Chien <loganchien@google.com> Merge with clang upstream r135574 (Jul 20th 2011)

Change-Id: Ib6cc2ba08a63e4cf8febc05fb6e3f2ca58f1d71d
686775deca8b8685eb90801495880e3abdd844c2 20-Jul-2011 Chris Lattner <sabre@nondot.org> now that we have a centralized place to do so, add some using declarations for
some common llvm types: stringref and smallvector. This cleans up the codebase
quite a bit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135576 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
9594675cc1eb52a054de13c4a21e466643847480 20-Jul-2011 Chris Lattner <sabre@nondot.org> introduce a centralized place to introduce and inject llvm types into the
clang namespace. There are a number of LLVM types that are used pervasively
and it doesn't make sense to keep qualifying them. Start with casting
operators.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135574 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
174cba922331b896949d02d8b1a05f1998ed98e1 16-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r135344 at Sat. 16th July 2011.
59c8457f01f908e75d0e61ec3bd99cebcd672cee 16-Jul-2011 Joerg Sonnenberger <joerg@bec.de> Correctly handle sysroot prefix in -print-search-dirs. Makes libtool
more happy on NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135344 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3e4d10917a7ef84ebf86062e8c912de9c00597c9 15-Jul-2011 Chad Rosier <mcrosier@apple.com> Prevent the -save-temps flag from modifying the input file if the input filename
conflicts with a to be produced temp filename.
rdar://9724657

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135308 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.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
ools.cpp
72ac120023abb73f3ff9386e193fed55fa9a96e2 07-Jul-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [arcmt] Add -ccc-arcmt-check/-ccc-arcmt-modify driver option aliases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134591 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f1443bedeb68a461c548f7a552fc0964520f24cb 06-Jul-2011 John McCall <rjmccall@apple.com> Somehow the -fgnu-runtime option itself got lost in all that shuffling.
Restore it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134459 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
oolChain.cpp
oolChains.cpp
ools.cpp
c06e0743431b28c96e0bbe27cc07851d2e0d2681 06-Jul-2011 John McCall <rjmccall@apple.com> Missing header from last commit; accidental change.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134455 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.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
ompilation.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
5b2b89b3e8aac573e49b3225ace4e0bb91663014 05-Jul-2011 Joerg Sonnenberger <joerg@bec.de> Drop "soft" argument that would be considered as file argument by cc1.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134438 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bcf6a8025aa50f3f28cfbd0470cf3e8f5cffbab2 05-Jul-2011 Douglas Gregor <dgregor@apple.com> StringRef'ize clang::drive::Option::getName(), from Zach Wheeler!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134418 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ption.cpp
3c54415a4e1db09b210a466469c72d2582ce1d83 02-Jul-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r134305 at Sat. 2nd July 2011.
37187cc4554d34fbbb5f168041d6acc4be028fe9 02-Jul-2011 Chandler Carruth <chandlerc@gmail.com> Make the GCC version proliferation worse by N+1 for the sake of
ArchLinux. =/ Fixes PR10246.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134299 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d18eecac712bfbf63372cb78940d662ce9017840 02-Jul-2011 Eli Friedman <eli.friedman@gmail.com> Make clang behave in a gcc-compatible way in the presence of multiple flags for the same x86 target feature (e.g. -mno-sse -msse). gcc uses a somewhat unintuitive algorithm here in that the enabled SSE instructions is based on the order of the *last* flag for *each* feature-level, so that "-mno-sse -msse2" only enables SSE2, but "-mno-sse -msse2 -msse" enables all SSE levels.

Issue reported on cfe-dev.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134296 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
aa7333c860ac651c75da495217e0d6a9c10c0bb0 02-Jul-2011 Eric Christopher <echristo@apple.com> Update for llvm commit r134291.

Fixes rdar://9714064


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134292 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.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
ools.cpp
99ca47b21f6b32ea8a92b0c8e0bea18170f86b9e 28-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: -force_load can be specified multiple times.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134025 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3f4be6fb8872942f567166ab8d99c89885f26103 27-Jun-2011 Bill Wendling <isanbard@gmail.com> libprofile_rt may be installed as a dylib on Darwin.

If we cannot find the static library, use the dylib instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133926 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3e66003c1f03bf734efbd0f8eea35784a2d78d66 23-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133721, Fri. 24th Jun.
89bb6146a8eca177b63fbcbc03c68f9012666023 23-Jun-2011 Dylan Noblesmith <nobled@dreamwidth.org> fix autoconf build from r133710

Sorry! This commit worked in CMake, but
CXX_INCLUDE_ROOT is defined in a different
config.h for autoconf.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133715 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7062281f240ef9c4fb343614fb2406532307c4a5 23-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133678 at Thu. 23th Jun 2011.
3404fe7105ecc3baa58b7ea725773de4112259d6 22-Jun-2011 Eric Christopher <echristo@apple.com> Build and use libcompiler_rt whenever possible.

Patch by Jean-Daniel Dupas!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133624 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
d71315c5511bd1204732216964faa6254dc4b2b6 22-Jun-2011 John McCall <rjmccall@apple.com> It is possible to request the nonfragile ABI with -fobjc-abi-version=2;
respect that when deciding whether -objc-exceptions implies the
-fexceptions -cc1 option.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133590 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a68e1c398a0ab9c24e82090fbb26c755dbc62c3c 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fixup version check for -object_path_lto support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133548 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
oolChain.cpp
ools.cpp
5bfa656e132560e616310b455d65604a49e33e35 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: When invoking the linker, automatically pass -object_path_lto so
that the linker has a place to put the temporary object file and can leave it
around (for the driver to clean up). This is important so that the object file
references in the debug info are preserved for possible use by dsymutil.
- <rdar://problem/8294279> executable has no debug symbols when compiled with LTO

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133543 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ed798951b46555946c95cb76568ea3cf0b16c9ab 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver: Factor out IsUsingLTO helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133542 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
468eb7ddd69b5d545139fc46a3b730268c458f38 21-Jun-2011 Joerg Sonnenberger <joerg@bec.de> Fix typo. From Damjan Marion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133511 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
2a45fa7cf67bf88a4edf56d637f6ec7326e44ef8 21-Jun-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor -Xarch_FOO when the arch matches either the toolchain or
the architecture being bound.
- Fixes things like -Xarch_armv7.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133490 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.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
ools.cpp
7a883e3e1798efdb12f06e4e1b722f9a659dbac3 17-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Add support for -force_load flag, for compat with Apple gcc. rdar://9555962 .



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133218 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
16c8f9d68ae6d302083763d4733e728634717dec 16-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r133163 at Fri. 17th Jun 2011.
c37039803a18c7f0f0975a618147d336de3d3d58 16-Jun-2011 NAKAMURA Takumi <geek4civic@gmail.com> Be aware of (x86_64-redhat-linux6E-)g++44 on RHEL5.

AFAIK, RHEL5 (and its clones) provides g++44 as the package "gcc44-c++".
By default, g++-4.1.1 is available, though, its libstdc++ would not be suitable to clang++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133156 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.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
oolChain.cpp
oolChains.cpp
oolChains.h
ools.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
ools.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
ools.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
ools.cpp
e5df885367b9e122ac11c89ddfbc62375695cdab 10-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132843 at Fri. 10th Jun 2011.
169dd31c6c552c9234ae97ac2013f9635bdbfa32 08-Jun-2011 Chandler Carruth <chandlerc@gmail.com> Revert "hack in my new variables for GCC"

Very sorry for the accidental commit of WIP code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132745 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8afdd56babf69cd8e3b45d0baff0d4fc20d088a0 08-Jun-2011 Chandler Carruth <chandlerc@gmail.com> hack in my new variables for GCC

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132743 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
db6393f259b8e634302e27d538ca4760f4221d91 08-Jun-2011 Joerg Sonnenberger <joerg@bec.de> Sort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386
may pick it up. This would create bad text relocations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132736 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
25a857b8039bc86695614126bfe4f21035d6c76b 05-Jun-2011 Benjamin Kramer <benny.kra@googlemail.com> Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132669 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
000a6552adc6372576d65170dfb5969fd03cc521 04-Jun-2011 Roman Divacky <rdivacky@freebsd.org> Adjust the linker for PowerPC64/-m32 on FreeBSD too.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132635 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3393cef18e887723aaa2395d33550ab35551af1d 04-Jun-2011 Roman Divacky <rdivacky@freebsd.org> Make -m32 work on FreeBSD/PowerPC64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132634 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
80df02592ccc283b20b66959f74c6d61af28cadb 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> On linux, -nostdlib was causing a --start-group with no --end-group to be passed
to the linker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132629 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7e46d0b8436d844d77f3ff580b6e1204e0407044 04-Jun-2011 Nick Lewycky <nicholas@mxc.ca> Identifiers with _CapitalLetter are reserved, so don't use them. Prefer the
common C++ pattern of using the same name for the constructor argument as you
do for the member. Noticed by inspection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132626 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c7409a0005f1d1efd7026ee84871afe588740b49 03-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> We were looking at /usr/lib only if the distro had multilib. This is bogus:
we look in /usr/lib to find crt1.o, and that depends only on where libc
is installed.

This fixes the case of using a different gcc installation in a distro
without multilib.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132551 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5a640efa55631cc38fe36bdd0ab8283b28322503 03-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Add support for centos.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132550 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9af535a0116c5f7159830ef98603d8142b3217a6 03-Jun-2011 Eric Christopher <echristo@apple.com> 80-col cleanup.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132543 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c7f532f9b8e934a0a284d15a739333372e979f61 03-Jun-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r132540 at Fri. 3rd Jun 2011.
304ed3f81ba96f10a431318e2d30f8fdb8399e60 03-Jun-2011 NAKAMURA Takumi <geek4civic@gmail.com> Untabify and fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132531 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
14ea13cb5af3e9925e141458ab1388daa2ede86d 03-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> We already have support for using c++ headers from a custom location.
Before this patch we would still link with the system libstdc++. It worked
fine most of the time, but would break if the used headers were a lot newer
than the system libraries.

This patch changes the driver to use the libraries corresponding to the
headers the user selected.

This fixes, for example, using 4.5 headers in a system with gcc 4.1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132497 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0b200f66b45cb34d0af71a5ce18f4a3c2cffcce1 02-Jun-2011 Eli Friedman <eli.friedman@gmail.com> Add Debian wheezy/sid to ToolChains.cpp. Patch by Michael Wild. PR10064.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132489 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
db3f24ac0dafad175e9daef1b8733600194f56e0 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Change how we link libprofile_rt.a. While at it, refactor the code a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132474 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
01ba8545fb6bae2a370606b4f40f0d17eb0a8c6c 02-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Add -fno-gnu89-inline.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132468 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
446b8472c77b71b3aa7fed2158b62fde171c2922 01-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Add the necessary -L option for finding libprofile_rt.a. It might be a good
idea at some point to split out the directories where we install our runtime
libraries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132425 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
951733d6ce270679db19e144782d76d9866eb166 31-May-2011 Daniel Dunbar <daniel@zuster.org> Driver/Clang: Simplify code to use arch enumerations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132338 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
43c9791207a2bd7cef8b17e9bfc4dd87db21690f 28-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream r132249 at Sat. 28th. May 2011.
477aab6782795e7472055a54108d2df270ce1a89 25-May-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> A StringRef-ication of the DiagnosticIDs API and internals.

Patch by Matthieu Monrocq with tweaks by me to avoid StringRefs in the static
diagnostic data structures, which resulted in a huge global-var-init function.

Depends on llvm commit r132046.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132047 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2e95a6d7d0b5aed39747875d7474c27824f7319f 24-May-2011 Nick Lewycky <nicholas@mxc.ca> When given one of the applicable coverage flags, try to link against
libprofile_rt.a. On Darwin, don't try to link -lgcov.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132006 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
776bff74a63b3ebf52b0a7cf9af878c108031208 24-May-2011 Roman Divacky <rdivacky@freebsd.org> Let amd64 be used in target triple instead of x86_64 on FreeBSD.

Patch by Dimitry Andric!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131990 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5b4e7b11e745329d8a55fd56504450dede1b2100 24-May-2011 Jim Grosbach <grosbach@apple.com> For non-Darwin, a plain 'char' type is unsigned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131967 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
848afb0c1ff4571ca7a21927ecc2699ea2e7429a 24-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131958 at Tue. 24th May 2011.
f0b60ecc824af1e99e4288a8dcc11b22e2a6ea5e 24-May-2011 Chandler Carruth <chandlerc@gmail.com> Fix a bug in the most recent openSUSE support patch.

This patch also by Ismail Donmez.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131958 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
64a891770158a944fd9eca3c8e11cd599211aa81 22-May-2011 Chris Lattner <sabre@nondot.org> add opensuse toolchain support, patch by Ismail Donmez!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131857 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d753b56d777a6ec1e62373dde8c398ae070a556e 22-May-2011 Chris Lattner <sabre@nondot.org> Add Redhat Enterprise Linux to the Linux toolchain, PR9769,
patch by Bryce Lelbach


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131840 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
7dfd96fd5f4e63071f5d4f684e9f0e1928d226c7 20-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131722 at Fri. 20th May 2011.
46a49391efab20d7a2a1c18f22edb3d76b465252 19-May-2011 Joerg Sonnenberger <joerg@bec.de> Correction for r131662, the GNU as option is --fatal-warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131671 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d793350dee89688f1cc939096dc60c3bc15c20fe 19-May-2011 Joerg Sonnenberger <joerg@bec.de> Support -fatal-warnings for the assembler frontend


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131662 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
de5c048fedb81f9b91c80cee1e5f4afd551dadd6 19-May-2011 David Chisnall <csdavec@swan.ac.uk> - Fixes openSUSE detection for 11.4 and upcoming 12.1
- Adds gcc 4.6 to gcc list so that linking will work on openSUSE 12.1

Patch by İsmail Dönmez!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131637 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
199e09a93813516a5e8f9ce2c3cd4c18d60961db 18-May-2011 Eric Christopher <echristo@apple.com> Add some support for RHEL5 systems.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131505 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
cb773921b1e8e7cf2a5dba25bd596d4f258a9daa 17-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Fix comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131478 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
97f6abb4470a82be4a8c6f1603e7bb303f9079b5 17-May-2011 Rafael Espindola <rafael.espindola@gmail.com> The logic about -static is darwin only. For now assume that all non
darwin assembler can handle cfi. Add a test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131464 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6ee6cf6a13e4047a78ce61951870c6605a7260f0 17-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131450 at Tue. 17th May 2011.
182564cd14a2105fff05fd52f5940eff96161d57 16-May-2011 Joerg Sonnenberger <joerg@bec.de> Make the triple an explicit argument of FindTargetProgramPath.
Preserve the original triple in the NetBSD toolchain when using -m32 or
-m64 and the resulting effective target is different from the triple it
started with. This allows -m32 to use the same assembler/linking in
cross-compiling mode and avoids confusion about passing down target
specific flags in that case like --32.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131404 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
d01d2b2de449d68e6c44d99a12c0c1fc53222113 14-May-2011 Nowar Gu <nowar100@gmail.com> Merge upstream to r131335 at Sat. 14th May 2011.
03e92303e6e9d366ff35388b982eea7f7db33e62 09-May-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Put dsymutil -o arguments first, so that dysmutil doesn't barf
when POSIXLY_COMPLIANT is set.
- Patch by Dave Vasilevsky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131084 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
359cf927cf4980099a04b3f3cf040b81d181fe3d 06-May-2011 Joerg Sonnenberger <joerg@bec.de> Move logic for passing down -mrelax-all / -relax-all into a common
function. Extend the logic to check if the input was compiled.
Use -relax-all as default only if -O0 is used for compilation.
Fixes bug 9290.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130983 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9d0fbeadc455c8292837b738b6af315d27930637 06-May-2011 Joerg Sonnenberger <joerg@bec.de> Rename ContainsCompileAction to ContainsCompileOrAssembleAction to
properly reflect its behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130981 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.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
ools.cpp
574bb5a5bbc7ffd726981e67e476ca1f8840276c 04-May-2011 Nick Lewycky <nicholas@mxc.ca> No, fix this use after free properly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130833 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3c989fc446fd8118aba964e8e0005ae510e4c621 04-May-2011 Nick Lewycky <nicholas@mxc.ca> Fix use after free through StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130828 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1a584022c86bd0778cf7ad1fbea08c78869cf216 02-May-2011 Eric Christopher <echristo@apple.com> Add the -mstackrealign option which just communicates the need to
force align the stack to the backend.

Fixes rdar://9289631


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130725 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cc95719054ef9949c88d21c6c8d349dac8b4fd36 02-May-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor --sysroot= when invoking the linker, on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130723 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
61b1efe2d0b459a98962fd9b4c097ad8bb9bfdec 02-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Disable CFI if not using the integrated assembler. We should probably do this only for
OS X, but it is probably not all that important.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130697 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
87e945f0f1fb5778c4c6b9e61356c7f1571b9cb4 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't link -lgcc_s.1 when compiling as iOS for the simulator,
that library has never been in the SDK. Fortunately, it shouldn't be necessary,
since that library was also removed in 10.6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130595 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b7f5ef73aee479b2fa54c30cfebed665be8fccb9 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: When using -mios-simulator-version-min, explicitly pass this on
to the linker.
- Only do this explicitly with the argument for now, the linker will need to
explicitly add support for this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130594 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3fd823b0625eba87153fe592a0fd12e088db3b36 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Reject invalid arch combinations with
-mios-simulator-version-min.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130593 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5f5c37b1234e6ebb6c17e084bc4e2cce92e31585 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Change Darwin toolchain to explicitly track is-ios-sim bit, and
update -mios-simulator-version-min to set it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130592 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
9d609f2b0dd604879f8b284ded1f14ba300e8070 30-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Sketch initial support for a -mios-simulator-version-min= flag
and associated deployment target environment variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130591 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.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
ools.cpp
3df2325a0fd4b868b804aa1708beb3634402c22d 29-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/cc1as: Forward -mllvm arguments when compiling assembly files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130516 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ce911f5fd76375948d18e6528fe7a7314c6e1ac9 28-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Set the deployment target following the version information in
the tool chain, instead of based on the translated arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130440 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
295163797a75c7c8b1f4b21fa7ac4a200bff9395 28-Apr-2011 Ted Kremenek <kremenek@apple.com> Make the top-level driver ignore -fobjc-default-synthesize-properties while this feature undergoes more review and development. This is still available as a -cc1 option for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130424 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ac127a09ab36f84860c176fe6b199c4973be984 25-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: When compilation fails, don't try to remove output files we don't have
write access to.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130150 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
80585d8c96c715f187ccfd180d93a084a86b4020 25-Apr-2011 Nico Weber <nicolasweber@gmx.de> Let clang detect gcc triple on Ubuntu Natty. Patch by Thomas Jablin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130119 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.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
ools.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
ools.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
ools.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
ools.cpp
3cc3ffc740e932e07519fdfc38ba4a76884e6e8d 22-Apr-2011 Nick Lewycky <nicholas@mxc.ca> Fix indentation. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129954 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8a3a7f36aea62a91d12a4aafd16cc32081ad11cf 21-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they
can't be represented in the environment define.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129939 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0e02f6ef48a098cc27a250e644415038c2fa52a5 21-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Tweak -Xarch diags a bit more, we can't actually differentiate between
unknown and "required more arguments", but only the latter should be feasible in
practice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129919 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7e9293b8be1716149f2150f96e76876719f14e45 21-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Improve -Xarch argument diagnostics a bit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129918 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
32c8cb66af6192adb82fe39779b460b605fa14ed 20-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Suppress some additional warnings with -Qunused-arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129853 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
659d23a4e645c1d7a700da05a1b1aabf9fd4c6f3 20-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using -macosx for OS name in triples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129834 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
729f38ebc6b5a747fe7565a5238e70c84ccfee84 19-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using new style triples.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129824 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3cceec5e05d974f3993bd0a745325f76fb8e4efc 19-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Change to use generic iOS runtime library, which we now always need.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129734 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b5fbb8931466eeab70a30a27a8d5f385472305a1 18-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Disable movw/movt with -mkernel or -fapple-kext.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129721 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
877ded8532736d49b3cda8708cf0e5e9c44a760b 18-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Support -fno-lto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129712 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d130c7df5db47e5467fd7f7888fecd403fed796d 18-Apr-2011 Ted Kremenek <kremenek@apple.com> Add ToolChain path support for linker on Slackware.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129704 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.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
ptTable.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
34bac1f7b1ad8018b0d456f38744891c4bf56f63 13-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/no-integrated-as: Fix forwarding of -g flag to assembler, when .s input
undergoes preprocessing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129414 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
09f43ed8a1be67360fde9b335eac60bac8db8e19 11-Apr-2011 Chris Lattner <sabre@nondot.org> fix the path to ld.so for darwin/ppc, resolving PR9677. Patch
by Jeremy Huddleston!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129299 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2eba7abeab4abddd28644200397f8a1d5badccdd 09-Apr-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r129173 (Apr 8th 2011)

Upstream Revision
git-id: 0ff32595e4b92c5bdee78946b39f9e990b20cc90
svn-id: 129173
b8a3e8139b9fe513500c89bbcd9133415654a689 09-Apr-2011 Dylan Noblesmith <nobled@dreamwidth.org> refactor -ccc-gcc-name code

Put the logic for deciding the default name for gcc/g++
in the only place that actually cares about it.

This also pushes an ifdef out of the generic driver code
to a little further down, when the target is actually known.
Hopefully it can be changed into just a runtime check
in the future.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129212 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
49af1f3cedc55726e4a3dd343eb4a8e24eab8439 08-Apr-2011 Evan Cheng <evan.cheng@apple.com> Rename -mtrap_function= to -ftrap_function= since it's now a target neutral options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129153 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b20e442b31287b7e926a118dec36bddc34dbe730 08-Apr-2011 Evan Cheng <evan.cheng@apple.com> Add -mtrap_function=<> option. rdar://9257465

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129145 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f44a1a04a36453527de2285c402fbe9453184121 08-Apr-2011 Chris Lattner <sabre@nondot.org> fix a typo, patch by PaX team.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129141 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
089f872fedb175f7569f24f1dba362ffbc403528 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Don't attempt to forward some Clang-only options to cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129108 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c8a22b091677c02003880166e5d5767ca8d74b70 07-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver: Sketch driver support for a CC_LOG_DIAGNOSTICS options, similar to the
existing CC_PRINT_OPTIONS and CC_PRINT_HEADERS, which can be used to
transparently capture the compiler diagnostics from a build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129082 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
8f1cc075c36212797ef52dac0e2fe35417a6bb6b 06-Apr-2011 Eric Christopher <echristo@apple.com> Add support for Fedora16, gcc 4.6.0 and Fedora Rawhide.

Patch by Bobby Powers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129014 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9a7319305fc25222b91d585dfa056c8cdbac8434 06-Apr-2011 Nowar Gu <nowar100@gmail.com> Merge upstream until 2011.04.05.
43ac2978291bf1471e2c916a88c7f1c1e170dc19 06-Apr-2011 Ted Kremenek <kremenek@apple.com> Add ToolChain support to get Clang to recognize Ubuntu/ppc and Gentoo/ppc64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128944 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
832316e9a04242972f4b57281dccb8e4cf5894ea 05-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Move Driver::createInvocationFromArgs function to Frontend library to avoid dependency cycle
between libFrontend and libDriver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128852 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
054e4f50e2f1995e91b0cd3c3258aa252785fe3f 04-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Introduce Driver::createInvocationFromArgs used to create a CompilerInvocation from command-line args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128848 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e87e717b0dbe4776f2b4dbb1e6ce2a19f562d2b0 02-Apr-2011 csmon7507 <csmon7507@gmail.com> Merge branch 'upstream' into logan-fastforward-20110320
1051fc0ba0fb924d6d4a88a2113460a40a542614 01-Apr-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Tweak simulator link logic a bit more to be closer to GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128738 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f445debe3a6825e6528655db0906ce4fa41240ea 01-Apr-2011 csmon <csmon@csmon-desktop.(none)> Merge branch 'upstream' into logan-fastforward-20110320
4035580e3475db9013f335ce2b8a49dd1988a79a 31-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Tweak link logic for simulator.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128641 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.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
ools.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
ools.cpp
5adb5a84bfb4f2e5f1ea28fdfc6ee1cd9b622c60 27-Mar-2011 Chandler Carruth <chandlerc@gmail.com> Add -f[no-]strict-overflow to the Clang driver. Use it to set the
default for -fwrapv if that flag isn't specified explicitly. We always
prefer an explict setting of -fwrapv when present. Also adds support for
-fno-wrapv to allow disabling -fwrapv even when -fno-strict-overflow is
passed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128353 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
59f9046031bc9703d405b5a9ec61541a90e03def 25-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Dsymutil actions should put the dSYM adjacent to the output file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128292 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5188507b9a1b09ec95c14ffadf0e832f2b47aa8a 24-Mar-2011 Ted Kremenek <kremenek@apple.com> Rework checker "packages" and groups to be more hierarchical.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128187 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7f9fc3f7ce076645cb6aefc99c64d9446caf13d6 23-Mar-2011 Chris Lattner <sabre@nondot.org> switch a few Driver APIs to use llvm::ArrayRef, cleaning up code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128142 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
97d2d2e368d3ead34d83c328383711c7dabab60a 22-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127980 (Mar 20th 2011)
1ec0ade3bb7d1468c3dfa6ba7ce7a48b2b95d9d3 21-Mar-2011 Bob Wilson <bob.wilson@apple.com> Add clang support for cortex-m0 cpus. Patch by James Orr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128018 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
10c6435e90631afd9a3f4f9e9ba0c3f53370d019 21-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Introduce FindTargetProgramPath to check for a target-specific helper
program and fallback to plain version otherwise. Use this for the NetBSD
target to make it try e.g. i486--netbsdelf-as and -ld for target
i486--netbsdelf.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127996 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
05e5930166333e382522b942f00d08abc6c0a28e 21-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if
-nostdlib is absent. Use = to allow --sysroot to work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127995 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
8ab2bdcc4f397e100c684ede8e8ca6e226e1380a 21-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Remember sysroot in Driver. Pass it down to ld for NetBSD, FreeBSD
and DragonFly. Use the --sysroot= form for Linux. Fix handling of =
prefix for -B.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127994 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
8e02635c9c276720a1e6f926b33303a53cebe9c7 18-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream r127869 (Mar 18th 2011)
d98750f065fd8d6278df72f6218e3d59b2df2aa9 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver: Forward -traditional and -traditional-cpp in preprocessing modes.
- We don't really support the majority of the horrible -traditional-cpp
behavior, but it is unlikely that we ever will either. This allows us to
start trying to use clang as a /usr/bin/cpp replacement and see what pieces
of -traditional-cpp mode people actually care about.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127911 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5ce872fdcdf868c60e91f4669b2c2925c5c2e6cc 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Transparently fallback when compiling i386 -fapple-kext code, we
don't support the ABI yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127903 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ac0659ae4124156915eddf70e78065df224d34c8 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver: Give SelectTool access to the action inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127902 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
oolChains.h
4702309fb6718bcb52751722cf6ed28742707e58 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Change fallback to use llvm-gcc search paths instead of GCC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127897 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
79be940271c69082344ea4e3d5a867e925a46d96 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Kill the DarwinGCC toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127896 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
7693b1021862ea04f522cca9ca1df67bd1d2d54e 18-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> On !Darwin, do use the integrated as with -static.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127879 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.cpp
d47ea693706f7b0ffa68e879b73a71609a337786 18-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Obj-C: Be compatible with GCC behavior in that -fno-exceptions *does not*
disable Obj-C exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127836 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0133917074027e4bd5cd6dabb9da03a6214a21b6 17-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: These are command line options, not target features.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127820 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7f6f8c8ab29db9221ed40ab7d5317df29848cc52 17-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Suppress spurious warning about -force_cpusubtype_ALL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127819 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fa41d6975058ceb1b8a24564f6dcec72f89f62e8 17-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ARM: Kernel/kext code has more strict alignment requirements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127815 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
7187fac0f19f75c62f575c9f15f0ed68b7d97810 17-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/ARM: Match GCC behavior in that -msoft-float disables NEON, despite this
not being consistent at all with other parts of the GCC implementation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127777 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9a2927c4e6afa56ade0e5acc654f07fc658a220e 16-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Use C as fallback type if in C preprocessor mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127769 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
814638ed5a7bb7fc9df96d9be2c9a5d2a0d96b02 14-Mar-2011 Douglas Gregor <dgregor@apple.com> Support Ubuntu hardy and intrepid, from Thomas Gamper!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127583 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ade3195a201e16e989e9f93a568fb1806519077c 12-Mar-2011 Ted Kremenek <kremenek@apple.com> Re-enable the IdempotentOperations checker for --analyze, and put it and the DeadStores checker into the "deadcode" group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127531 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
27d70656d3ce7c9e030b6dea468cfc96687010d5 09-Mar-2011 Logan Chien <tzuhsiang.chien@gmail.com> Merge with clang upstream (Nov 6th 2011)
65f7165676854bf75494f5b73a620d7237db5d41 07-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Redo part of r127137:
Pass down the correct C->getArgs, but keep it with the original
DerivedArgList type. Slightly adjust the MakeIndex call for the
different base type. This unbreaks the handling of --no-mangle on Darwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127142 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
951c5705771a57eca0bca07aae5d4738619dd6c6 07-Mar-2011 Joerg Sonnenberger <joerg@bec.de> Explicitly initialize CCCIsCPP


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127139 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9ade4ae4fb7ed1fcbd63835d9f8f53052f0657a2 07-Mar-2011 Joerg Sonnenberger <joerg@bec.de> If called as *cpp or *cpp-[^-]*, run only the preprocessor. If no
input is specified, use stdin implicitly. Based on a patch from
Roman Divacky.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127137 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
f0594d8b64cf32c55dde7a49ba849e864446c92b 06-Mar-2011 Douglas Gregor <dgregor@apple.com> Fix driver for thumb-capable ARM hosts, from Mikko Lehtonen!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127128 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
476fc6715c4119a8e39ec70fbf9df1c57580ead8 05-Mar-2011 Anton Korobeynikov <asl@math.spbu.ru> Normalize target triple passed out of driver. Basically this means
that at cc1 level we will always have normalized triple and thus can
provide necessary default based on e.g. environment value (e.g. for
"arm-eabi" triple, etc.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127087 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0726d167dc10a5215243772f858ac2c5f190ef9a 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Fixes PR8611. Silence warning about -g not being used during linking. I couldn't find any change in behavior in gcc liking when given -g. Please open another bug if I missed something."
3d498fa2690befdd01f4b91ccbe48e5e96d041d9 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add driver support for Ubuntu 9.10."
184cc263c3f6bb4e0ff56df3c590c7294f8254fd 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Driver: Support -Oz as an alias for -Os."
c26fa5e5ffc2dcd18bda303bfa5fec2c82f80a96 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add support for -nostdlib in the linux toolchain."
84835064f19957d5fbd85b94066949a69092fa0e 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg and Cosmin Truta for reporting it."
13a0374c723899e3b04cc7337ac1ef3962468297 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Driver: Allow build system override of default non-fragile ABI version."
f082f437ee13ee54d4587d9c7894c79a6f1e7ac2 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add -rdynamic to freebsd and openbsd. Patch by Ruben."
776e52022e795b892eb08c6b16a23200e01d4096 02-Mar-2011 Shih-wei Liao <sliao@google.com> Merge "Add support for Exherbo. Patch by Elias Pipping."
db04e2e26dd991ecddb6badf8c91ee46de80c31c 02-Mar-2011 Daniel Dunbar <daniel@zuster.org> build: Allow disabling movt/movw from build, for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126810 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
86643b88a11582cfff2091a4815950d166269428 01-Mar-2011 Benjamin Kramer <benny.kra@googlemail.com> Since getDriver().getInstalledDir() returns a const char *, don't try to
compare it with getDriver().Dir.c_str(), since that is a pointer
comparison, not a "are these strings equal" comparison.

Instead, just compare with getDriver().Dir directly, so both sides will
get promoted to std::string, and the regular std::string comparison
operator applies.

Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126791 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
bbe8e3eff56ac1d79f3668d706536e3cebe28c18 01-Mar-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Be bug compatible with GCC and ignore -pg on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126767 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
451f8caf37fb6691936f9003833e857e1d1dc987 01-Mar-2011 Roman Divacky <rdivacky@freebsd.org> The default CPU on FreeBSD for i386 should be i486, not pentium4.

Patch by Dimitry Andric!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126763 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
20f1462f817ac1374f42c6d62853f137feff147b 01-Mar-2011 Roman Divacky <rdivacky@freebsd.org> On FreeBSD, we don't want 'getDriver().Dir + "/../lib"' added to the
ToolChain's FilePaths. If clang is installed as a port in /usr/local,
it is *not* supposed to use /usr/local/lib by default, for example.

Additionally, there are no clang-related executables in either
/usr/libexec, or getDriver().Dir + "/../libexec", anymore, so remove
that from the ToolChain's ProgramPaths.

Patch by Dimitry Andric!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126760 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
58e5ac9d41d8186bea92e892d572e2eea28d3f9c 01-Mar-2011 Roman Divacky <rdivacky@freebsd.org> For linking on FreeBSD, don't add a hardcoded "-L/usr/lib", but
retrieve the library paths from the ToolChain object instead.

Copy the relevant code from linuxtools::Link::ConstructJob(), and
replace the std::string stuff with llvm::StringRef, while we're here.

Patch by Dimitry Andric!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126757 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
9c094fbcfaba49fc1aeca119c0e12bec59779692 01-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Disable more warnings so that it is safe to use
CC="clang -use-gold-plugin -emit-llvm"
CXX="clang++ -use-gold-plugin -emit-llvm"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126740 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
035ff0c6746a2689667c83d4c02a47d5a7b71e82 01-Mar-2011 Rafael Espindola <rafael.espindola@gmail.com> Don't warn about "clang -use-gold-plugin -c ...". With this users can say
CC="clang -use-gold-plugin" CFLAGS=-emit-llvm ../configure...
and not be hit with a warning for each .c file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126713 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
e6533ffc680e84cd193b4ea0d81548e251cb1f2f 28-Feb-2011 David Chisnall <csdavec@swan.ac.uk> Make -fobjc-nonfragile-abi and -fgnu-runtime imply -fblocks (unless -fno-blocks is specified), because this combination of flags defines an Objective-C runtime that includes a blocks runtime.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126654 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
43f220f6d74e01f2606e429810484177903a28e6 28-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Fix a tiny goof in the Driver's logic which caused the explicit presence
of -fexceptions to disably C++ exceptions. The correct code was in the
ObjC branch, this just mirrors that logic on the C++ side of things.
Thanks to John Wiegley for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126640 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
15348aeb81285c75b2e92b5bf8d2db3445d147c2 28-Feb-2011 Anders Carlsson <andersca@mac.com> Add a -fcxx-exceptions flag to the frontend, which can be used to enable
C++ exceptions, even when exceptions have been turned off using -fno-exceptions.
Make the -fobjc-exceptions flag do the same thing, but for Objective-C exceptions.

C++ and Objective-C exceptions can also be disabled using -fno-cxx-excptions and
-fno-objc-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126630 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a676d501a001657892c483bd4d651650e168f337 28-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Move the DeadStores checker out of the 'core' package.

-Now it gets enabled with '-analyzer-checker=DeadStores'.
-The driver passes the above flag by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126612 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
525544de0835d5ee7497f4897e255727b162e0aa 28-Feb-2011 Anders Carlsson <andersca@mac.com> Factor code out into a helper function, shouldUseExceptionTablesForObjCExceptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126601 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
053ec969e3023e4b4a666546476ff74e6bfdfd9a 27-Feb-2011 Logan <tzuhsiang.chien@gmail.com> Merge with clang upstream Nov 10th 2010.
34f9e296418229074e1cf2ecdf5049cb6acfcebe 25-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver: Attmpt to fix some possibly UB that MSVC doesn't care for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126513 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3fd345a59db34de5bc8e29a64ebd9f68a1e9eb44 25-Feb-2011 Chandler Carruth <chandlerc@gmail.com> Add support for ArchLinux, patch by Kevin Winchester.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126476 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6b7367e53c47ae0528dbc658bbac603d24f87f94 22-Feb-2011 Chris Lattner <sabre@nondot.org> improve support for SUSE Linux Enterprise Server 11 SP1 (x86_64).
Patch by Csaba Raduly!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126245 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
oolChain.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
ools.cpp
a2e40219e0a8f609a6c4cfc213223f02a3cef3c9 21-Feb-2011 Chris Lattner <sabre@nondot.org> Pass the right linker flag in openbsd::Link::ConstructJob,
patch by Matthew Dempsky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126133 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
8899ab01d43ca7359cd852e58c5c3182cd0979c5 19-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] '-analyzer-check-objc-mem' can go through the llvm/clang codebase without crashing; enable it for C++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126026 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ac38d7b5d88d12f454a7cda1275bf429813151d 19-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Support -Wl, with -Xarch_. This doesn't work naturally because of
the special way we model "linker input" arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126023 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
7dd445ec20e704846cfbdb132e56539280d71311 17-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on the non-path-sensitive-checkers:

DeadStoresChecker
ObjCMethSigsChecker
ObjCUnusedIvarsChecker
SizeofPointerChecker
ObjCDeallocChecker
SecuritySyntaxChecker

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125779 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0aa205765aec0aa5eed672f8e3cade543372edcd 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.

No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125742 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
125b4cb35536e45201f8f2cb19ee620e3ad67c49 17-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> Fix whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125741 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2fb468dcf86d306ba8557b4914a0d09fe946d1fa 17-Feb-2011 Ted Kremenek <kremenek@apple.com> Disable default synthesized properties until we can properly re-evaluate the feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125708 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
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
ools.cpp
027a6abdd6cedc0b8203da72eed6d15c796dce9d 15-Feb-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> [analyzer] Use the new registration mechanism on some of the internal checks. These are:

StackAddrLeakChecker
ObjCAtSyncChecker
UnixAPIChecker
MacOSXAPIChecker

The rest have/create implicit dependencies between checkers and need to be handled differently.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125559 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
242302673bdcf35b49579a30fed9dc068a4e10f2 10-Feb-2011 Matt Beaumont-Gay <matthewbg@google.com> Add braces to quiet a gcc warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125309 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c16bb76f25ada63864aa89827a9906c1579d2ad3 10-Feb-2011 Roman Divacky <rdivacky@freebsd.org> Adjust the object files to be linked in when mcount profiling
is specified in the FreeBSD linker driver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125285 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
886e1606c28e970bb288abf4dbc40feb16822a79 10-Feb-2011 NAKAMURA Takumi <geek4civic@gmail.com> CMake: LLVM_NO_RTTI must be obsolete now!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125275 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
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
ools.cpp
09982cec0029bc495591067fa89967b6b4d1fa19 08-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Allow multiple -B prefixes. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125111 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
fc2bd7c3efed6756a030d58a5f6ae31947e7d451 04-Feb-2011 Bob Wilson <bob.wilson@apple.com> Add better support for ARM EABI triples.
Patch by Renato Golin!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124878 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2843c1900b6da763885f47d0999e923e7c67fd65 04-Feb-2011 Daniel Dunbar <daniel@zuster.org> Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124875 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
398c610b16728b4398214367dd0effd9d2e61340 04-Feb-2011 Daniel Dunbar <daniel@zuster.org> build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what one
might expect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124848 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
2100fe952a644134b1dca462f2e6330cf14ef47c 03-Feb-2011 Oscar Fuentes <ofv@wanadoo.es> Moved here from LLVM Clang's configuration options and related macros.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124825 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
322c29fefe7fa33f03273136eb5f8b7f5b4df7c0 02-Feb-2011 Daniel Dunbar <daniel@zuster.org> clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrors
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header
usage from a build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124751 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
8e50a96b387dca7525caa8a6add31420dd82a2cd 02-Feb-2011 Benjamin Kramer <benny.kra@googlemail.com> Add NetBSD target support. Patch by Joerg Sonnenberger.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124736 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
b2d11cc3abd5ddf421a9bd36c6ec558038748a83 02-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms.
Fixes PR9121!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124718 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e10f90095354ac819fa1fa2646fd850fac862532 02-Feb-2011 Nick Lewycky <nicholas@mxc.ca> Add support for x86-64 Mandriva 2010.2. Reported by 'rindolf' on IRC!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124699 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.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
ools.cpp
80f0ab78f60379589c815b41de5d149c9479ca98 30-Jan-2011 Roman Divacky <rdivacky@freebsd.org> Add hardcoded -L/usr/lib after all -L options to the FreeBSD linker
invocation.

This mimics what gcc does and fixes libtool check for libraries.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124558 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
3f1d1f9131cb8ad24704a193ab29f938e1bc553f 19-Jan-2011 Logan <tzuhsiang.chien@gmail.com> Use automatically generated Version.inc instead.
ndroid.mk
150e0efec6302fa5a8c3b5c3c4ecf5778d3a29f5 19-Jan-2011 Logan <tzuhsiang.chien@gmail.com> Add build rules for clang executable.
ndroid.mk
657ca6683d754c903026221a3aa3aa9cedb7556f 16-Jan-2011 Chris Lattner <sabre@nondot.org> improve compatibility with GCC: when generating the ".d" filename to use
and the filename has multiple .'s in it, use the last. For example, "foo.bar.cpp"
should produce "foo.bar.d" not "foo.d". Patch by Johan Boule in PR8391


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123576 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f0335171b4908939bac410f865fc09ceb06ac632 14-Jan-2011 Ted Kremenek <kremenek@apple.com> Driver: tweak handling of '--analyze' to invoke
analyzer -cc1 options that are tailored to the
input type. If the input type is "C++", we should
only run the dead stores checker (for now). Similarly,
checks specific to Objective-C should only run
on Objective-C Code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123481 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
48aef3625a0a80d044b40f872355990134ee7598 13-Jan-2011 Chris Lattner <sabre@nondot.org> optimize out a temporary sys::Path


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123359 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2dea7c7c23b37508976b90b871390450b9c8bc3b 13-Jan-2011 Michael J. Spencer <bigcheesegs@gmail.com> replace all uses of PathV1::IsSymlink with PathV2::is_symlink.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123344 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
95a907fc0f2f717dca38a379c1d2353bfea06d4f 12-Jan-2011 Daniel Dunbar <daniel@zuster.org> Driver: Change -dumpversion to return a GCC compatible answer.
- See comment for why.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123296 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
32bef4edba854303800b3b01cb49a282e5da4f69 10-Jan-2011 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::exists with PathV2::fs::exists.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123150 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
ools.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
ools.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
ools.cpp
3fdcc6fb12d7cf38d2a3111736f80f0dd55447b4 31-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Remove stray emacs mode markers in all these files that was causing emacs to
open them in fundamental-mode instead of c++-mode.
Also twiddle whitespace for consistency in ToolChains.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122646 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
rg.cpp
rgList.cpp
ompilation.cpp
riverOptions.cpp
ob.cpp
ptTable.cpp
ption.cpp
hases.cpp
ool.cpp
oolChain.cpp
oolChains.cpp
ypes.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
oolChains.h
ools.cpp
592f241d0abd000f404a12fba1474d4d963d7ff7 20-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Fix PR8639 by making the "argument unused during compilation" less agressive. Now we
don't warn if an argument is not used because it is shadowed by a subsequent argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122281 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
d5b08bee799d4f77f1a25fa5977ca77b983ab031 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::get{Basename,Dirname,Suffix} with their PathV2 equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122140 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
472ccff00cdbcd095c3ba933b9e3f202719f118f 18-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::getLast with PathV2::filename.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122117 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
df344dfb663f99184e734f5d14b5fc9b2725aec2 17-Dec-2010 Eric Christopher <echristo@apple.com> Going back to the drawing board with these two awful hacks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122096 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
74cae0c64d3cf85bcfbc9e7febac83a580804d57 17-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Fix spelling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122088 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
256053b31e697fdf0cc48f17d621c82fc3b8dff0 17-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Replace all uses of PathV1::isAbsolute with PathV2::is_{absolute,relative}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122087 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2c5c3135286a8cb27406dc6dcecfbd16e7c898fa 17-Dec-2010 Eric Christopher <echristo@apple.com> Horrible hack for systems that use -dumpversion with clang to expect versions
that match gcc versions. Eew.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@122080 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4eeebc464e1f968d9968a4786c82558f18ac2ed8 16-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> MemoryBuffer API update.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121956 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3a321e23f66128dbb986343927456ff6702af617 09-Dec-2010 Michael J. Spencer <bigcheesegs@gmail.com> Use error_code instead of std::string* for MemoryBuffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121378 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9eb93b07ea913e7ad0bcd15bd3e3662e2760c323 08-Dec-2010 Daniel Dunbar <daniel@zuster.org> Driver: M and MM should be grouped together, <rdar://problem/8744831>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121284 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
bb3f9952842f4efa663303b0fd1e23a04a0ad082 01-Dec-2010 Nick Lewycky <nicholas@mxc.ca> Remove stray emacs mode marker.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120554 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.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
ypes.cpp
49c64fdcf354c7998b8b301402fb6140c24df36a 01-Dec-2010 Rafael Espindola <rafael.espindola@gmail.com> Handle -nostartfiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120528 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ompilation.cpp
river.cpp
oolChains.cpp
ools.cpp
1d636c2a56910474605d59be0c20e6c2239c1c0e 28-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add missing else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120231 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a4c2475961184a4bad6f6f087eeb1038bb784cad 21-Nov-2010 Anders Carlsson <andersca@mac.com> Forward the -fno-elide-constructor argument to clang -cc1. Fixes PR8652.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119915 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e4539ef4633fa5c0867e247b5bc88e0f753a2336 19-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Check for gcc 4.3.4.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a30d6cdc3a32af8bd06d5a1a218a32840cd70a00 19-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't pass -demangle to an iOS linker, which may not understand
it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119809 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2a69ddd2d4a48620bbd001b1fa777d73511f4150 19-Nov-2010 Nuno Lopes <nunoplopes@sapo.pt> add support for the i686-pc-linux-gnu triple (used by Gentoo x86)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119807 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d02bba8e2abceebd91c162ee4479623791f455b5 19-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -force_cpusubtype_ALL.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119803 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
be3aab6abe5e66bb86596da806acc49614eacb69 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Use hasErrorOccurred() instead of getNumErrors() where it makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119746 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
33e4e70c8c0a17e0ccb7465d96556b077a68ecb1 18-Nov-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Refactoring of Diagnostic class.

-Move the stuff of Diagnostic related to creating/querying diagnostic IDs into a new DiagnosticIDs class.
-DiagnosticIDs can be shared among multiple Diagnostics for multiple translation units.
-The rest of the state in Diagnostic object is considered related and tied to one translation unit.
-Have Diagnostic point to the SourceManager that is related with. Diagnostic can now accept just a
SourceLocation instead of a FullSourceLoc.
-Reflect the changes to various interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119730 91177308-0d34-0410-b5e6-96231b3b80d8
river.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
ools.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
ools.cpp
fdda17179047ff0b5e28cc777dc89ebc42f083cf 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Implement -pie.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119577 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dbe80d9933e1fb0c26bd339e1f1f2f2d76dcac0a 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't warn about
clang -w -c foo.s
Helps with the gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119574 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7f6458b7e265d1870f3bd5be2b49bc4d368446b3 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't warn about -w not being used in a link. Necessary to get sane
results in the gdb testsuite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119552 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
db85e058ed244931c81cefecbebf1a4a3030ea2d 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Silence warning for "clang -O2 -O0 -c foo.c -o foo.o.
Fixes PR8607.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119498 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
53dd00bae3b31aa637666715c6dee0eb01723d92 17-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for distros that like x86_64-unknown-linux-gnu.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119425 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9a88800412f888d8eaa798ac320f6a2a38f0f33d 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fixes PR8611.
Silence warning about -g not being used during linking. I couldn't find any
change in behavior in gcc liking when given -g. Please open another bug if
I missed something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119166 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
26f14c309e8de2db8c144342808cca2e869c1777 15-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Fixes PR8611.
Silence warning about -g not being used during linking. I couldn't find any
change in behavior in gcc liking when given -g. Please open another bug if
I missed something.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119166 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
818ddde1a74b0689ab1de84dccf3eeeef071363b 15-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add driver support for Ubuntu 9.10.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119137 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5ede807c1194c3a44c0adee83eca24efd626e5bb 15-Nov-2010 Zhongxing Xu <xuzhongxing@gmail.com> Add driver support for Ubuntu 9.10.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119137 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
00bb6ad360d36c9e70ff380a5f1b28043eb35730 13-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -Oz as an alias for -Os.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119003 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5e3bc947e305b307c6bd8e5d49b5b06e2fe6bbf4 13-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -Oz as an alias for -Os.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119003 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d4ece338ee82938e4e33cb646d78d4dc956f70ea 12-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -nostdlib in the linux toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118878 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
89414b384a0004c698244cc675f49d0669bb3463 12-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -nostdlib in the linux toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118878 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8f51edf63e2d03bd19a6d3b675b3da0969daba49 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg and
Cosmin Truta for reporting it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118826 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e0e6d3b5cf61dfefad3c0393f4786d2cf3d9c272 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -s, -pthread and -pthreads. Thanks to Hans Wennborg and
Cosmin Truta for reporting it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118826 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f92979fa9a12e1d5f054542fc5e2ef03ee590bfb 11-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow build system override of default non-fragile ABI version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118786 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
de17ba7af23bd3693add73af127600b568cb210b 11-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow build system override of default non-fragile ABI version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118786 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
41f6c5736d6a7a563743821081ee5cd2b2a50d0a 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add -rdynamic to freebsd and openbsd. Patch by Ruben.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118771 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
65ba55da577b23b24513b815031fc870d1d27971 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add -rdynamic to freebsd and openbsd. Patch by Ruben.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118771 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
59a996cdf4f8bc54dda29ca1e4d5b8aaeb07c298 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for Exherbo. Patch by Elias Pipping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118769 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0a84aee0a3ada448fb4ae5fd4964791d42a501b3 11-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for Exherbo. Patch by Elias Pipping.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118769 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a503bd2db52fb28dc7504cf0fd304a3693bb7189 10-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for Ubuntu Jaunty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118673 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
021aaa4f6b86bc9e2801f3475d1ec3dd7bc008c7 10-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for Ubuntu Jaunty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118673 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
584a4569f982e79db3f936429eda918be30a5675 09-Nov-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for soft/hard float options to the Sparc target



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118514 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
9284d215022457ba867080a713f08f026d89ea17 09-Nov-2010 Bruno Cardoso Lopes <bruno.cardoso@gmail.com> Add support for soft/hard float options to the Sparc target



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118514 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
0318e7aa77e28eaf119826c8e80ea36ce2c47068 08-Nov-2010 Roman Divacky <rdivacky@freebsd.org> Add a forgotten break. Found by Rafael Espindola!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118433 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
fe3a7ea7f2132ec5cd0510cc21d2677614a6ab3a 08-Nov-2010 Roman Divacky <rdivacky@freebsd.org> Add a forgotten break. Found by Rafael Espindola!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118433 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c060b17202ff2263ddb2570c349b8d7b7c44d193 08-Nov-2010 Roman Divacky <rdivacky@freebsd.org> Use integrated-as for processing .s files on FreeBSD. Copied
from Linux/OpenBSD code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118419 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
67dece7e8b38138dd07e3d461d675dd8c8b4e025 08-Nov-2010 Roman Divacky <rdivacky@freebsd.org> Use integrated-as for processing .s files on FreeBSD. Copied
from Linux/OpenBSD code.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118419 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3723043c1d7024844f27a21924543ccc28b0b1ce 08-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Pass "-z relro" as two arguments. This works with both gnu ld and gold.
Patch by Frits van Bommel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118406 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
94c8022573b2f7da5124558a8d0597b0e8fbb381 08-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Pass "-z relro" as two arguments. This works with both gnu ld and gold.
Patch by Frits van Bommel.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118406 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
36e1e2e2367b2bc61cbdac9a037885740f62c5e7 08-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118386 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
dda5b92c770b024a2b551bb22331d079821f67a0 08-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use the integrated assembler when procession .s files on OpenBSD and Linux.
Original patch for OpenBSD by Vladimir Kirillov.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118386 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
26afabc95023782c267a8ba59e29efc666bec3c7 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -rdynamic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dc1b76ddfc687c713a55cc9e3e054e9a0de1aa74 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Add support for -rdynamic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118384 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4857d6c6b44999ee9951a649c2a021b605f798c4 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.

A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.

It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
c1da981bba867681004004b2d54ec2fdf3c08913 07-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Use ld directly on linux. Changes from the previous try:
*) Try to detect as much as possible from the system itself, not the distro.
This should make it easier to port to a new distro and more likely to
work on a unknown one.
*) The distro enum now doesn't include the arch. Just use the existing
host detection support in LLVM.
*) Correctly handle --sysroot.

A small regression is that now clang will pass bitcode file to the linker.
This is necessary for the gold plugin support to work.

It might be better to detect this at configure/cmake time, but doing it in
c++ first is a lot easier.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118382 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
6dbcbbcfcdcc44c8f7641dc788d2523cf1a09b5b 03-Nov-2010 Argiris Kirtzidis <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
river.cpp
ools.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
river.cpp
ools.cpp
eccf1109ec2ebd80d3a2f8b89749f3302ed4de71 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert while I debug test failures :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
138e66ffa8008b95121580f5459af45487df9803 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Revert while I debug test failures :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118150 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
b3cca134f96969a4325fb633c26fa328b69530f2 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running

gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared

and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.

While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
29a88f441fb9d82cfa898774cf6711e54bcba2ff 03-Nov-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running

gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared

and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.

While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118149 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
b43e7eefac66c31f8473b0ad4db0147cbe266216 02-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Silently ignore -fasm-blocks for now instead of error'ing, this cause
some unexpected fallout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118037 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
168943947a42d6819dce56b420dc5aef4d0831ce 02-Nov-2010 Daniel Dunbar <daniel@zuster.org> Driver: Silently ignore -fasm-blocks for now instead of error'ing, this cause
some unexpected fallout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118037 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
660a719c624e3ff73670f21fe44f71f4a60e1957 30-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117779 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
d99d0e8276dd320deaee02824602bc335ea1c770 30-Oct-2010 Benjamin Kramer <benny.kra@googlemail.com> Use the expanded form of S_ISREG. Hopefully this unbreaks the MSVC build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117779 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
45502107add88ac600efc9c7d5443ad45fb0a17e 30-Oct-2010 Dan Gohman <gohman@apple.com> Don't test isRegularFile before calling eraseFromDisk, since
eraseFromDisk does the same check. This avoids a stat call
in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117744 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
978e3a274aae203a6c2b74094be791ac9e2662e5 30-Oct-2010 Dan Gohman <gohman@apple.com> Don't test isRegularFile before calling eraseFromDisk, since
eraseFromDisk does the same check. This avoids a stat call
in the common case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117744 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
d71d18539c76a01399dc62e44c58556701210a03 29-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch to using the integrated assembler by default on x86 and x86-64 ELF
systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117697 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
e43cfa1fdbf5b404a76e31f31b1505c7852a1967 29-Oct-2010 Rafael Espindola <rafael.espindola@gmail.com> Switch to using the integrated assembler by default on x86 and x86-64 ELF
systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117697 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
126848ffc24253763e84cb10e82b64717d7f1f7f 28-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b14eed0ed44ed3af881219dab7dc6464cad5303b 28-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Ignore -L for now, which users shouldn't be using for semantic effect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117600 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
01e70084f5d9ddfbb09dcecb498ddce71a5c70ae 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
ools.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
ools.cpp
d5513a31553eeb274a7dd16500a01a440297e7a5 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
ools.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
ools.cpp
fd443c4e0f713a2e2d2c8792c231a63fd19cebe1 20-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Add support for the '--sysroot' flag, and an accompanying test of its
interactions with -isysroot and other driver commands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116912 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
feee58ce268765742e41c473c8648607fd4831a7 20-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Add support for the '--sysroot' flag, and an accompanying test of its
interactions with -isysroot and other driver commands.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116912 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
be04ded9c80527b699e859e22320e6290c2d3747 19-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Use CLANG_RESOURCE_DIR define if one is provided, otherwise use the default of
'../lib/clang/<version>'. Actually use '..' rather than removing the trailing
component to correctly handle paths containing '.' or symlinks in the presence
of -no-canonical-prefixes, etc. This shouldn't change any existing behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116803 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
acd65bd27011f5aa863bcf3a980888e3760dae26 19-Oct-2010 Chandler Carruth <chandlerc@gmail.com> Use CLANG_RESOURCE_DIR define if one is provided, otherwise use the default of
'../lib/clang/<version>'. Actually use '..' rather than removing the trailing
component to correctly handle paths containing '.' or symlinks in the presence
of -no-canonical-prefixes, etc. This shouldn't change any existing behavior.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116803 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
64303d028a514f286f44d9712cd15da96fd73538 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
passing it is very prevalent in some circles).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
25b26ebdebe46bb4576247e0c64d1c11410a8e9d 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Reject -fasm-blocks except on X86 (where we just ignore it, since
passing it is very prevalent in some circles).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116761 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7bfeddd7b9c9426aa431e3b95b33a2d9ca4c6b85 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116759 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fcec10bded7b9b9268af5232fa17617db0df68ed 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/IA: Accept and ignore -force_cpusubtype_ALL, as in 'clang -c
-Wa,-force_cpusubtype_ALL t.c'.
- Tweaks -Wa, and -Xassembler handling to only accept an explicit short list of
arguments and give an obvious unsupported error on others.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116759 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e375b8250931b45640496ccc29fa788c634a4abb 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Forward -ObjC when linking, which may be needed when using static
libraries with Objective-C code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116758 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
270073c1e44d073e9732204fc099f280b368fab5 19-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Forward -ObjC when linking, which may be needed when using static
libraries with Objective-C code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116758 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cb51bfe16c8176f9be54ea71eb294913306f81a6 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Error on -fno-for-scope, which we have no intention of supporting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
06205ca78ca2fd4384b237f120ec66614df0d9fc 16-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver: Error on -fno-for-scope, which we have no intention of supporting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116627 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fc2f8a26879d9748cfc1b8dc91677786bed35faa 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Revert r116605, a lot more were committed by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
63d907bc55ccb6abfc57b409cab3cfa7c0d1f38a 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Revert r116605, a lot more were committed by mistake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116606 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
736ecd779eeb123a1371ad43e4158896adbefccb 15-Oct-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
721f38c7f866259e1472af775239a83d8f06f6a8 15-Oct-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add '-include-pch' option to the driver, so it can get passed to the cc1 driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116605 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
279a5508dec94431facaacc94ca54f44a04cdaf7 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
ools.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
ools.cpp
98002be420a4fe9548d7dcc48527ce76716d7021 12-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Remove a useless warning about missing runtime libraries. These
are almost never needed, so the warning isn't very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116263 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
362ed7052071245c6c1b15d59c1973f8c80b0b2a 12-Oct-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Remove a useless warning about missing runtime libraries. These
are almost never needed, so the warning isn't very useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116263 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4b8b94dd61d94ab477667c57b4e5222a09336f08 12-Oct-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
75e0b8e039854095621567470b9c847b27cd9b51 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
rgList.cpp
ptTable.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
rgList.cpp
ptTable.cpp
61831e04f17a03844204fc9cef420385240aba0b 11-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116183 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
24da18f7285cc7601dbe467f466e2e04fa9eef6b 11-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Driver.cpp: Use the driver g++-4 for Cygwin-1.5.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116183 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
272ca5d0570538c84d52e8141d7d1b4ef98e445d 10-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116161 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cd7a30b12c6780d790f4c7924aff05caee05670d 10-Oct-2010 NAKAMURA Takumi <geek4civic@gmail.com> lib/Driver/Tools.cpp: Disable cxa_atexit by default also on Cygwin.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116161 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d551ef9855e8f4d6bbb94463e354d1fb511c7b94 08-Oct-2010 Shih-wei Liao <sliao@google.com> Add optional LOCAL_MODULE_TAGS.

Change-Id: Ib3e4ab576cdd174e598d2362ab381780df9bd37e
ndroid.mk
32a4baebfa2f579b3be3b31dce97658bd5414258 29-Sep-2010 zonr <wade1227@gmail.com> Add Android.mk to build libclangDriver and libclangFrontend. Todo: Include a small portion of files used in libslang.

Change-Id: Ib8d1a1a7de8c6ef1a79f2551fb26c21dcdf5add2
ndroid.mk
5775b4da486d47faac404597c46705ad007a3fb3 08-Oct-2010 Argiris Kirtzidis <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
ools.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
ools.cpp
dc7c03d7d07a978a84aaaa12908a86a24bcfb879 06-Oct-2010 John McCall <rjmccall@apple.com> Teach the driver to pass -fexceptions in Objective-C inputs on ARM.
I don't know when this stopped happening, but this seems to be the
right place to do it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115730 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4a1cdb5803ea0ad49ccbefb7f9ae14df9d677173 06-Oct-2010 John McCall <rjmccall@apple.com> Teach the driver to pass -fexceptions in Objective-C inputs on ARM.
I don't know when this stopped happening, but this seems to be the
right place to do it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115730 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
20bbddf97ff0fbaa171310567b9bee78155d50f9 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
ools.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
ools.cpp
cc2be05b3c5d4e654fb9e3fe67625f46c6da9480 30-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Driver: Ignore the found PCH file if its '-include' is not the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
990142a23e41392ef7c0f14db4c0fcac67311cdf 30-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Driver: Ignore the found PCH file if its '-include' is not the first one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115158 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5d25c4e4dd2ddde4b602b640b2e1401e7f12a67b 25-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Linux: Translate rewritten lib options back to standard -l form when
using generic GCC tools.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114793 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
48f9994bdd9f7f1853782109595b1f80f50afcfa 25-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Linux: Translate rewritten lib options back to standard -l form when
using generic GCC tools.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114793 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
634b52e0ce0aa85678730fefb0d95958d8ad4c94 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
to prevent users from trying unsupported stuff. Useful for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114749 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e94db4771856659c12e1f269141cbbc4e55b1c47 24-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -fallow-unsupported which disables some of the eager error'ing we do
to prevent users from trying unsupported stuff. Useful for testing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114749 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
60597d2570d03699fe5e42f5e8a4086cf3bcf327 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Revert r114712 due to failure on darwin buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114713 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
bfd21240b6b4989854c8f5331dc86ce7aecf1ad4 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Revert r114712 due to failure on darwin buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114713 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6a1e0e48339ffdf61e3e3b13813bd33580ab078a 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114712 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
280ec9d23cf16f50fd173bc87da7d2101446bcdd 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Make -M/-MM behave like in gcc; use -MF first then -o else use stdout.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114712 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
25147702ca1c50f7cb18ff466e8d79d436fcf44a 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix header comment so we don't break emacs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114711 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
e3365aa452673f7ea3244bb6638551f13ab7570d 24-Sep-2010 Nick Lewycky <nicholas@mxc.ca> Fix header comment so we don't break emacs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114711 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
3316bb6fb7fcba8229db6c73543b5aa309d4901e 23-Sep-2010 Argiris Kirtzidis <akyrtzi@gmail.com> If -fcolor-diagnostics is explicitly passed to the driver respect that even if the driver is of the opinion that
stderr can't handle them. (see http://llvm.org/PR8150)
Patch by Frits van Bommel!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114638 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f765d76407d82e629337bba4ca6c26bdfc8bc9a6 23-Sep-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> If -fcolor-diagnostics is explicitly passed to the driver respect that even if the driver is of the opinion that
stderr can't handle them. (see http://llvm.org/PR8150)
Patch by Frits van Bommel!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114638 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
11c9d0afa52527d11aeabbe1b7c8e652a983e30a 22-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386
some projects still depend on ___eprintf being available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114509 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
885b1dbc6e48db318f7a6b72c1592e8fb46b081a 22-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add a runtime library just for ___eprintf -- when targeting i386
some projects still depend on ___eprintf being available.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114509 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
cc421a21cd903fc70de54000ec9948ef4b8c539f 20-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
document behavior. Will wonders never cease.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dea63134a51d463cf32f3eec3c359d9215359d69 20-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Objective-C: Retool Objective-C ABI flags to be more usable, and actually
document behavior. Will wonders never cease.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114334 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cd6465007c683f263436d7b225316d3d6ec03ba2 17-Sep-2010 Shantonu Sen <ssen@apple.com> Driver: implement driver automagic support for -lcc_kext

Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a

Resolves Radar 7808495


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
7433fedce98a58341d0f30c2e12e8d53f3bba575 17-Sep-2010 Shantonu Sen <ssen@apple.com> Driver: implement driver automagic support for -lcc_kext

Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a

Resolves Radar 7808495


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
a38c11f3fb24329bddb1e6ac720b82216642e8bc 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
ools.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
ools.cpp
131347f0c4b3e6212dfc8c8a4e04fe1d0b3658eb 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/DarwinClang: Add GCC libexec paths so we can find the cc1 binaries if we
ever use fallback.
- Not necessary for clang as a compiler, but useful for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114172 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0e50ee4b94929ff172099bbd0c1029721ac79bc2 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/DarwinClang: Add GCC libexec paths so we can find the cc1 binaries if we
ever use fallback.
- Not necessary for clang as a compiler, but useful for testing purposes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114172 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
05870b8249ee62e465afb7c555fb642aabc6abfe 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Reapply "Driver/Darwin: Time for another spin at switching to the DarwinClang",
now that eprintf symbol issue is resolved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114166 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
a9b02c09056e255c5193e83800624b8bc552a1da 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Reapply "Driver/Darwin: Time for another spin at switching to the DarwinClang",
now that eprintf symbol issue is resolved.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114166 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
c28655bef1f8ba16449b84249cd7a675de23f5cf 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver/Darwin: Time for another spin at switching to the DarwinClang
toolchain.", while I investigate the totally non-surprising ensuing breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114164 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
b6bc587be4bb329cc6bd27d94b9c792438f5852b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver/Darwin: Time for another spin at switching to the DarwinClang
toolchain.", while I investigate the totally non-surprising ensuing breakage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114164 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
0834b8e58b7ab2cc6cbdf0b93ef41bc15174203b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -dumpmachine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d829950b2b75d50fca2772a20129323a186993a5 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -dumpmachine.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
220fb3b0e3f4c9c46176713f2a992b9b73c44ea0 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Time for another spin at switching to the DarwinClang toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114149 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
7a16997c34c18212eb9166f88c6fdd4684b09c07 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Time for another spin at switching to the DarwinClang toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114149 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
da8ef4d001cdcac042eadf228e21e22015f56ffe 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
132e35d2f87895d20e7ea146c8c00404b80221a1 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114147 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
4bf14c46c43ec4184432a682219f8232fd82a072 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/DarwinClang: The new toolchain definition is going to drop the -L inside
the GCC dir. Unfortunately, this breaks -lstdc++ on SnowLeopard, etc. because
the libstdc++ dylib was hiding there. Workaround this by providing the path to
the right -lstdc++.6 (the only version used in recent memory) if we can't see an
obvious -lstdc++, but can find = -lstdc++.6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114146 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
efe91ea6bb6f45aaf663a43a1960998bc1eb9378 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/DarwinClang: The new toolchain definition is going to drop the -L inside
the GCC dir. Unfortunately, this breaks -lstdc++ on SnowLeopard, etc. because
the libstdc++ dylib was hiding there. Workaround this by providing the path to
the right -lstdc++.6 (the only version used in recent memory) if we can't see an
obvious -lstdc++, but can find = -lstdc++.6.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114146 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
b3ba2873b296940f73f035e3f28bdc4f8b64e10b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
e5a37f48388c7e4cc081f44d13a4910bfa56cd35 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
c9f055249a602e12a1482ac998cff844bfac8edf 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out AddLinkerInputs() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114138 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2008feead855f08500fb01ff43ef5eebee05d1e5 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out AddLinkerInputs() function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114138 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e910deab1f8c61e430feab32b1c1552b5ff59a2b 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a toolchain hook for whether the system has native LLVM support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
b993f5d93b994b9b0aac6aebae669621744bbed7 17-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a toolchain hook for whether the system has native LLVM support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114137 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
f7f561cf932f2b4c891b62fdb322c4019f3e32f0 15-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Make the new -fobjc-nonfragile-abi2 the default
abi for clang's objective-c compilations.
(radar 8353555).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113974 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5f81d8aa26ad4de6568772c4768b272af96c18be 15-Sep-2010 Fariborz Jahanian <fjahanian@apple.com> Make the new -fobjc-nonfragile-abi2 the default
abi for clang's objective-c compilations.
(radar 8353555).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113974 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1fed452f1e5486e1c3e6204fb5e284189b19ea7f 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a -stdlib= argument which can be used to select the C++ standard
library to use.
- This is currently useful for testing libc++; you can now use 'clang++
-stdlib=libc++ t.cpp' to compile using it if installed.

- In the future could also be used to select other standard library choices if
alternatives become available (for example, to use an alternate C library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113891 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
3f16c959e30b7e7ba8e4b8d597c313fbe457206d 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a -stdlib= argument which can be used to select the C++ standard
library to use.
- This is currently useful for testing libc++; you can now use 'clang++
-stdlib=libc++ t.cpp' to compile using it if installed.

- In the future could also be used to select other standard library choices if
alternatives become available (for example, to use an alternate C library).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113891 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
4e3f3d8a256a23d6cd9e614d1f2a629aa03274cd 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out some code for handling the C++ standard library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113890 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
641b98b7b52e0067beaf3978f2a8721e5d16c111 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out some code for handling the C++ standard library.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113890 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
5a3de6deda246c0e904c45b3acaa7c77ee81c9b3 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113889 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1a2cd4fd5d384faf171a39dea7136ca4672ac35e 15-Sep-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113889 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fe0fb28bcfc69003c77765352186302b6ba30a90 14-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

CMakeLists.txt
lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
560a921b85773ac7c2d1a7a4aec4682c822c5cb4 14-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> Revert "CMake: Update to use standard CMake dependency tracking facilities instead"

This reverts commit r113631

Conflicts:

CMakeLists.txt
lib/CodeGen/CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113817 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
7a61d567792b1c3c8ff674fe111198b50e951ade 11-Sep-2010 Anton Korobeynikov <asl@math.spbu.ru> Disable cxa_atexit by default on MingW.
Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113683 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d0a57d53223eccb482757c5aab436e8bd5a9c794 11-Sep-2010 Anton Korobeynikov <asl@math.spbu.ru> Disable cxa_atexit by default on MingW.
Patch by Dimitry Andric!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113683 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
42591fac8f92efab995608d36060579a9b688d66 10-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
5a7f34958ca6f2fa8a52e9921cf521cbb92ae070 10-Sep-2010 Michael J. Spencer <bigcheesegs@gmail.com> CMake: Update to use standard CMake dependency tracking facilities instead
of whatever we were using before...

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113631 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
98d532aad446c7a008d54077cd09450640b06e35 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Make the compilation object available in AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
748de8eda222f087434d8bd703176b316a061341 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Make the compilation object available in AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
e81fd3fe22631cfe97c9b136239b20ec05cdb895 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113541 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fee1add2ee677144cda2c809f9b3485b8e58c01b 09-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113541 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a38512534c7e4455907c202408362c1d0b265e85 09-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Clean up CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ec9bf475657e4fd7c8e920ff816a4e3cdb2ea213 09-Sep-2010 Douglas Gregor <dgregor@apple.com> Clean up CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113489 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0de11453e6a225e8ad43575438a8a0fa5716d082 07-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Catch another case where ld ends up using ld_classic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113226 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9ced7049caf7c9543badb302f3bb43a6bc264705 07-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Catch another case where ld ends up using ld_classic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113226 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
877deda54124f2fcbf0a4c9b2b6aabe6f34512a6 07-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113212 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bcf1da8ff6ab007a23a8d1be8e950d92cee4241e 07-Sep-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't pass -demangle to the linker when we know it is going to
use ld_classic. This is a temporary workaround, the linkr itself should handle
this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113212 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
871351562c321476001bb2e4db5b505941762d38 06-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113138 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
79e9e9dd533de9609ef141449bf50e705fa68fd0 06-Sep-2010 Rafael Espindola <rafael.espindola@gmail.com> Make "-ccc-cxx" option work on Linux.
Patch by nobled.

I also took the opportunity to make the field private since now it is only ready from the
outside.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113138 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
644bdba6b1cbd9ec564b9b2babf45ba7c2d64a00 03-Sep-2010 Douglas Gregor <doug.gregor@gmail.com> Add missing #include

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112974 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
34916dbb1018dc7a7f42a339923f5b73762e9872 03-Sep-2010 Douglas Gregor <dgregor@apple.com> Add missing #include

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112974 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9ba45ce7b7f7bbcfb7a1df5da49ac5ccf9beaa4c 03-Sep-2010 Chris Lattner <sabre@nondot.org> fix a hard coded version number, PR8031. Patch by 'nobled'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112970 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3f2cc6f42bce4c5c31fa6026eb54bf73dd60fade 03-Sep-2010 Chris Lattner <sabre@nondot.org> fix a hard coded version number, PR8031. Patch by 'nobled'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112970 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a0c4d36c100b81356d3cd749c2adfef1d4f61868 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
ools.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
ools.cpp
5930ab8acac5864b91f7fc1a2091fda9d7df99d7 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
ools.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
ools.cpp
a4202c183705c285d7639e9fbc347c6d2173263e 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
ools.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
ools.cpp
c896bdbfffe451cd81acfc62fc2886c2a6e92ce9 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112138 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
2dc70ad391cb75ea90a2fb5d14a7f1d271534da3 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch back to old toolchain, looks like new one isn't quite
ready yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112138 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
804025b549511d026754a70bb709e162d5abd8d3 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko where I switched to always using the old toolchain, instead
of always using the new toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112125 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
5edbd23c2a6b21cd4a80e1a83db3fcfadb339764 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko where I switched to always using the old toolchain, instead
of always using the new toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112125 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
1c2702cb3ac97db42863d234280d805d7299d861 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass the right arch specific dir for ARM, when linking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112124 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3a0e3926b8824076cf5c2f9c96883e72fd84c9cb 26-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass the right arch specific dir for ARM, when linking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112124 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
62a6d22982dfe5e4b392d19cd3fff33faea9c8b8 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
ools.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
ools.cpp
74eea7f5b89ec9dbe192288238b6a52fed0f0857 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111921 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ca0e0545c216afaacba6da6c82a270dc2efc4e3f 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Clang: Forward -Wa, and -Xassembler to clang -cc1 when using the
integrated assembler. For now this mostly just means that we will error out if
someone tries to use this mechanism to send an argument to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111921 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6d500913f14a95a3e077c8cec97fff2bd0a3e1db 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
00577ada44c889fbe311d61c51a8da89e65c7c9a 24-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move Clang "triple" computation routines to method on the
ToolChain. This fixes a potenial bad cast when running Clang on PPC code, since
the tool chain in effect is not a subclass of the Darwin one, but we were
treating it like it was.
- This introduces some gross code duplication, but the right fix for it is to
just move the Driver to start depending on the targets in libBasic, so I am
not planning on fixing it immediately.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111856 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
b82e7152e7e8fcf7ad5fc5a70ed769dabdbde9fe 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using simplified tool chain by default -- what better
way to see what will break! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111840 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
673745ff71889df736458f68b8fcca43d794b2b8 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using simplified tool chain by default -- what better
way to see what will break! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111840 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
fd793b3df71278c7c2a60d59ce5e21b1a18f7860 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: When using the simplified Clang toolchain, make sure to also pass
the arch specific gcc lib path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
eab3bc4f0b51b6558c85eb6a8079f327573790ba 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: When using the simplified Clang toolchain, make sure to also pass
the arch specific gcc lib path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111839 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c5efa6b04c84b0afc022b468ac404ca83bbd48c1 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Update -ccc-install-dir to also set the installed dir. Totally
non-obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111838 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c4ab3493bb3048014895cf577a8f27505a83603d 23-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Update -ccc-install-dir to also set the installed dir. Totally
non-obvious.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111838 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
13621d7c1b38463491fca60acdd15b459e1d4018 22-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Add two new enumerations to the unsupported list for Windows so that all cases
are handled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111773 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e97673f10fbb557be2d95f6ca0fcdb6f6dc82b3b 22-Aug-2010 Chandler Carruth <chandlerc@gmail.com> Add two new enumerations to the unsupported list for Windows so that all cases
are handled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111773 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
367213bcd822d77d3c24e3607b4ce3b1127dd5af 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Visual Studio tools used on win32 hosts when targeting win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ff58e3610f4e12094def69eb2d6dcb4330378d8f 21-Aug-2010 Michael J. Spencer <bigcheesegs@gmail.com> Visual Studio tools used on win32 hosts when targeting win32.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111748 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
bf4c70994c4cdf4a5f753f26a60a583bf148f2f4 19-Aug-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
ffe60b90f330236eb46393ca9c4b209ab291cff0 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
reported as unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111310 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c326b64a4d14ad89d6a5d227d2460050149d5461 18-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Claim the -mlinker-version synthesized argument, it shouldn't be
reported as unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111310 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
64d5bb2d729b1808a9e5ce07cc9d35986f87015c 16-Aug-2010 David Chisnall <csdavec@swan.ac.uk> Pass some things to the linker that gcc passes. -r is the only one of these that I'm sure about, but the others seem to be listed on FreeBSD by gcc -dumpspecs, so I hope they're right. Apparently -r is also not passed on GNU/Linux (and should be), but I can't see where the toolchain definition for this platform live.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111114 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c736377543edcfbb00a4150fae79b4d9d9f66849 16-Aug-2010 David Chisnall <csdavec@swan.ac.uk> Pass some things to the linker that gcc passes. -r is the only one of these that I'm sure about, but the others seem to be listed on FreeBSD by gcc -dumpspecs, so I hope they're right. Apparently -r is also not passed on GNU/Linux (and should be), but I can't see where the toolchain definition for this platform live.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111114 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0fc30d4b6f569ff829430b7881b485462990c9fb 13-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111005 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
caeed1d3a5b366ae8fda5dda9bddc7bbb859c41f 13-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OptParser: Add a NoForward flag to prevent forwarding certain options to
GCC.
- Mark -Xclang and -mlinker-version= with it for now, although I am sure there
are more.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111005 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
07b8e22f84fc71f0baaf244109ccb81e1ef814b5 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Use the compile time linker version as the default for -mlinker-version,
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110886 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a77a723489b0cff63bf90f23416e10b8b6fc1f55 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Use the compile time linker version as the default for -mlinker-version,
if detected.
- This is a hack, we really want the linker version at execution time, but we
don't have any infrastructure for getting that. Yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110886 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
aac96bf2958472ef11593bb44909c1c1ce8697b6 12-Aug-2010 Argiris Kirtzidis <akyrtzi@gmail.com> Switch on PCH for C++. C++ fans all over the world rejoice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110879 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e5c35377020d6c38d16434c9f373a5fa9bb4f2eb 12-Aug-2010 Argyrios Kyrtzidis <akyrtzi@gmail.com> Switch on PCH for C++. C++ fans all over the world rejoice.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110879 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e4ee732a1dd25822a75706a8a13d08fda6781695 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -demangle when linking, if the linker supports it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110873 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b18dc5b8376f42f7b4802bf1279e95eeb813fa06 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -demangle when linking, if the linker supports it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110873 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f4f7745b58bdde35c435f0a1244a855a8c242fca 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -mlinker-version=, which forwards to -target-linker-version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110872 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c176bc6be6f1407e7c6bd062f05a8636ea9a08e3 12-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -mlinker-version=, which forwards to -target-linker-version.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110872 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e7a46035335aa38bcdb1837fb300917eab522abf 10-Aug-2010 Ted Kremenek <kremenek@apple.com> Turn on idempotent operations checker when using --analyze.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110695 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
79a79f5d323155ac99155c621a360ef8a68055a8 10-Aug-2010 Ted Kremenek <kremenek@apple.com> Turn on idempotent operations checker when using --analyze.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110695 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b3f1e2d3862372ab6eeb53f62e3a76b14cc897d9 10-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
- This is eventually going to be unified outside the host specific code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110693 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
9d5600a8349cdda4e4971ebbbf7aa15a9da8bba7 10-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
- This is eventually going to be unified outside the host specific code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110693 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
0019324fe31c13a9df7b262a92a627e81367a348 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Run the assembler instead of gcc on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ba30bbe4e36a30a274da809a11a42f9cdc168e92 10-Aug-2010 Rafael Espindola <rafael.espindola@gmail.com> Run the assembler instead of gcc on Linux.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110635 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
da89be4d508f5ce9fabb8972d3c1859904971ceb 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
ools.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
ools.cpp
029ca3a583368ce9ed5748ed40ef4a9d808b4762 03-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Don't forward any -g options to GCC, when using it to drive the
assembler.
- Fixes PR6218, hopefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110111 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2dffe2d9d631fefd79d4999f6ffe7ac0d70882b1 03-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Don't forward any -g options to GCC, when using it to drive the
assembler.
- Fixes PR6218, hopefully.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110111 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e5dee9d78610031bd18e1c87e40da89fe639a2d9 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Change where Darwin computes the host version, to normalize tool
chain construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110028 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
25b58eb7998ed947bc1c07e70de0b5d8f6aff857 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Change where Darwin computes the host version, to normalize tool
chain construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110028 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
2427740158884c7cca08c9cef76a309df3d22407 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Have -ccc-host-triple simply override the default in the driver, for
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110027 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6699877c45d119ca74e4c1d7c3c9fb90e95398e1 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Have -ccc-host-triple simply override the default in the driver, for
now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110027 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ca7b69166ae80210da499f7d577e438adb4d5fa0 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Inline some constants.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110026 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
c2bda62f0ccbfc22651d9d986282c497afc9be1d 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Inline some constants.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110026 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
2bdb420a157f108477c384c5912929db7d86c86a 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize tool
chain construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110025 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
214afe96b4210ca36d99621dd930225e6bf5b9b3 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Change how FreeBSD derives the Lib32 variable, to normalize tool
chain construction.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110025 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
d8407fabf72c1067042ac595a5178d87dbe46379 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
4180011fb8cef06adec04d30486b1bf3b99aa8b8 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Move HostInfo::lookupTypeForExtension to ToolChain::LookupTypeForExtension.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110024 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
785d916965baecbe9688fe047225d8e36608bdbe 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Give Build{Universal,}Actions access to the default host tool chain. I
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110023 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
74edcea3db1f85ba73ad0fede2ed5e2f096cac4b 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Give Build{Universal,}Actions access to the default host tool chain. I
avoided this originally to enforce that the driver actions aren't toolchain
dependent, but it isn't worth the cumbersone additional hostinfo split.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110023 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
75787c36bd9642688510f3e90193a617f4046135 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Compilation::addCommand and switch tools to using it, now that we
don't have to deal with nested jobs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110015 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
2fe238ed293bd4bc27af9beb9fa151fad2146fa8 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Compilation::addCommand and switch tools to using it, now that we
don't have to deal with nested jobs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110015 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
1be423ebf2e9213b96da34755de6583c35784119 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate PipedJob, which is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110014 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ob.cpp
d0b77e1a47580dd9fd621433e9ac41258837a17a 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate PipedJob, which is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110014 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ob.cpp
a55a74e0f057eae0cbcfc951e4f7f0c60c3cae42 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate special InputInfo kind for pipes, it is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110013 91177308-0d34-0410-b5e6-96231b3b80d8
nputInfo.h
ools.cpp
7c1e46533cae07216e2a67d5636a5afb44253155 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate special InputInfo kind for pipes, it is now unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110013 91177308-0d34-0410-b5e6-96231b3b80d8
nputInfo.h
ools.cpp
18d00e40b94ea02ba06011d79e8f8057dec7d066 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
8c631e3b6fb4d838809852e85ba4145be45a221f 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unnecessary tool hooks for whether they accept piped input/output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
3e0fe00c7bb4c3b9b9211c3a422604f0b3d55a49 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110011 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9b18cca61197421af872df81014390c9cb813516 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110011 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
113d7be6858755a3abf6c33c1089cf2bae7fe4e3 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110010 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e4341253cc5d9c05c256b90eb3f816d256264ceb 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate now unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110010 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5e3b3b19c596ffb2b111a234d315e2867e1ae3c2 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Simplify logic for sending 'clang -E t.c' output to stdout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110009 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
defcda7ea696c41ecaad36cc77f2360b91697265 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Simplify logic for sending 'clang -E t.c' output to stdout.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110009 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
509f385701cce3b3ad10b1075eae895f6bfd4efc 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Never try to use piped inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110008 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
58e12fd6df3b692a8385d1c1b9644ba98e86e64d 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Never try to use piped inputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110008 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d5b8e35fdd241a5d5103999013c452dc4a5433d3 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Start ripping out support for -pipe, which is worthless and complicates
too many other things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110007 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c19a12dc3d441bec62eed55e312b76c12d6d9022 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Start ripping out support for -pipe, which is worthless and complicates
too many other things.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110007 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f4192a65178ccc46be0f11e157fca184e4f63832 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
Gray.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109994 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
95c0457054518102af6250e718a13a5b2ee5dbea 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
Gray.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109994 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
75019278d0b4ad63b6be0f8775c7e6099cf99acc 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep track of a separate "install dir", which is the path where clang
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
edf29b00bc1641034b38be92146e15f0625a45d2 02-Aug-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep track of a separate "install dir", which is the path where clang
was invoked from (which may not be where the executable itself is).
- This allows having e.g., /Developer/usr/bin/clang be a symlink to some other
location, while still making sure the Driver finds 'as', 'ld', etc. relative
to itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109989 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5c97179a01c4f535de125c39593fb16a1f16c92b 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109074 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f5438e3462f37d7c58f847b594b4b3ab84085d67 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109074 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3782f22b7d3019306e84b2f013d0bbcbb861f0fb 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally
use blocks even when targetting older systems (using runtime checks and weak
linking).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109072 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ef44a5d65c48b92802aac02126d36c03d818e847 22-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Always allow blocks on Darwin, so that users can conditionally
use blocks even when targetting older systems (using runtime checks and weak
linking).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109072 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
1489176435e51f2bbf1a0f20c6fe8e579bd0de17 20-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Add -lstdc++ to DragonFly tools.
Patch by Sascha Wildner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108830 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
405861d4ae824795f506d03cd7578f011cbf5b87 20-Jul-2010 Rafael Espindola <rafael.espindola@gmail.com> Add -lstdc++ to DragonFly tools.
Patch by Sascha Wildner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108830 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e6ceb1bc4f23dc434c887a1ad0a26cad75e54579 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fnext-runtime the default when rewriting Objective-C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108741 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5314e448631f166c89e908cc1ab45dc7eda916ba 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fnext-runtime the default when rewriting Objective-C.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108741 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d572ce19b6f99ceebde91128e62c87f6aaa903df 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add deployment target after doing argument translation, so that
-mmacosx-version-min works inside a -Xarch_ flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108712 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
60baf0f6d54376805168d49fa68628f801f95ef9 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add deployment target after doing argument translation, so that
-mmacosx-version-min works inside a -Xarch_ flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108712 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
2b69aedd8316253fc72a67b9fe213dcdcfb470ee 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out Darwin::AddDeploymentTarget.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108711 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
c0e665eb705762f95cd4f722ad7ecbdcde3f4527 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Factor out Darwin::AddDeploymentTarget.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108711 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
219f777d069dc9f1da85dd831ddc4e90f4de72fa 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change the driver to take the path to the main executable, instead of
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108667 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0bbad519aa068206f1e158d5073f72a39fbe83c5 19-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change the driver to take the path to the main executable, instead of
taking it in pieces.
- Fixes a problem where the Clang executable path was not initialized properly
on Win32, because sys::Path::getBasename() doesn't do what I always think it
does. Imagine that, a sys::Path interface that is confusing!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108667 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8eef82cc37356a4ce63614fc252722981cd0aba8 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a possible use after free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108659 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a001c1ce5fcb669624a5b8e50d0a629d673da901 18-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a possible use after free.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108659 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ef006823ecd2344aa0b47065d6d2b2bcbe95a853 18-Jul-2010 Chris Lattner <sabre@nondot.org> BUILD_ARCHIVE is the default for libraries, no need to set it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
9638eef7e3b2ca30406c5d369a44aa49ff26b201 18-Jul-2010 Chris Lattner <sabre@nondot.org> BUILD_ARCHIVE is the default for libraries, no need to set it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108633 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
2d00a1f3f96a4c9be4c3b270f8f88e45fd980fb9 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108426 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2bb38d0d93e56617f93091a92b2e6396c0cd0dcd 15-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Resolve deployment target defaulting to be more predictable;
assume we are targetting OS X unless an explicit option is given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108426 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0432654153303b62cdb1a17dc6daba4de82de018 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: When re'execing clang, use path to the main executable instead of
looking up Clang in the normal search paths (which may end up finding the wrong
clang).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108346 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b9a822639c570b1853c75c235e9d6bad485f9e01 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: When re'execing clang, use path to the main executable instead of
looking up Clang in the normal search paths (which may end up finding the wrong
clang).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108346 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
9062faa75699366cda7cdb9fc68aa70f280ee82f 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108345 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
4a7e88978cf646ad10d654020cb00b3877069210 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some unused arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108345 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
ools.cpp
d878cad4bf70fbf187309add23ccf88fd0d5b193 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
are explicitly given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108297 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
47e879dfa735f81472a51b1bd69cc4eb9159db39 14-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
are explicitly given.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108297 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
b615eefeb4419b77f5ce726813aaa3a5cf352536 09-Jul-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
6f4bed50c076d7c8dd115c4c8af150d44bb6b379 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
38e317d6dce161b249508686cc67eb7176958762 07-Jul-2010 Chris Lattner <sabre@nondot.org> add driver support for minix, patch by Kees van Reeuwijk
from PR7583


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107788 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
a0173ee552a235c935e2df51cb90f44298f9e385 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
ools.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
ools.cpp
2e16df608164ca9507bec34f46c0c7ccf9098f8b 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gcc
library directory, as we still rely on a few libraries that are hiding there (in
particular libstdc++.dylib).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107353 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
424b6613a9e5631d61c4c8ed2f1601457b64bfd4 01-Jul-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Add one -L for the DarwinClang toolchain to point into the gcc
library directory, as we still rely on a few libraries that are hiding there (in
particular libstdc++.dylib).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107353 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1ef616acecfa252e9386e359ecb024fe627ae6c5 29-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Only run dsymutil when we are also compiling/assembling as part
of the compilation.
- <rdar://problem/8141387> clang is always invoking dsymutil

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b5e2f698accd4d3a1379983304a2f31ec194c332 29-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Only run dsymutil when we are also compiling/assembling as part
of the compilation.
- <rdar://problem/8141387> clang is always invoking dsymutil

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8f596bcda2e05faa812b66287199c8b0a38b7a9a 28-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Set the default arch based on the triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bcd6df662471e0ac2d3d85fdba09b1295c2fc468 28-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Set the default arch based on the triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2d20033d68db8028f5d86f413466b576f86ae3ed 27-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Use softfp for linux gnueabi, keep the warning for everything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106984 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7e9cebfe1246bb9051a364474b6570eb40dbac4b 27-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Use softfp for linux gnueabi, keep the warning for everything else.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106984 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3d897ad92331e29821c049ff0eaae548fd17a3b4 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
ools.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
ools.cpp
db984209630f45ef0c14515b4c94728510735a81 23-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add make variable to allow disabling default integrated assembler, till
all the kinks are worked out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106641 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
71a6cbc5a101899f54e0a76aece82c01b48ad089 23-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add make variable to allow disabling default integrated assembler, till
all the kinks are worked out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106641 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
49c86ec57b4cf2db82cbfd959fb78fee854fdc95 23-Jun-2010 Douglas Gregor <doug.gregor@gmail.com> Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106602 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
169b753b4546b464ad81742ec09a9b9bb11d3b47 23-Jun-2010 Douglas Gregor <dgregor@apple.com> Make c++ and C++ valid extensions for C++ source files, from Seth Cantrell!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106602 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
8e3697ffd7f20bf62667a7a119d6c466e5abb931 22-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some dead code left around after a refactoring. Found by the
Clang static analyzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106568 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
be6d8e3bc409fe70964e5fdb675571fde37a59d0 22-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Remove some dead code left around after a refactoring. Found by the
Clang static analyzer!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106568 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b377aed9fc0a90a0788af717c5a37c871061b7ce 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
ools.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
ools.cpp
00f90b974369ccd699c3d29e4edef8526d78083c 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
ee6e4b4baa1acd85ba8b142862ac5986621aaffd 17-Jun-2010 Sean Hunt <rideau3@gmail.com> Update CMake build for new attribute changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106188 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
313f9d430b4699b81de878ebba190d18d9908199 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1ed1a594e9befc91ebf00d81b41a2fdfab862657 16-Jun-2010 Rafael Espindola <rafael.espindola@gmail.com> Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9388e882c413cd3d9720f708bfcd275fd69c2be0 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
ptTable.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
ptTable.cpp
d8b2f7e37d5282b77100c453dfeb05810abcfcb2 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106039 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
212df32d955c34dbb8b976bc0316e8eb83ac579e 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support -Wp,-MMD,FOO, which I found an instance of. :(

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106039 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2951755e71ff826af2b7ab12b34b5c6e4d662222 15-Jun-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
e2d5f3522c7105485c63f8c3a5f916eafe5a5369 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Add libexec to program search paths, to workaround some build
problem; patch by Ed Schouten.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105996 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
7fb2c25ab0b6fa1543bce410dbdb2ee5d2513a86 15-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/FreeBSD: Add libexec to program search paths, to workaround some build
problem; patch by Ed Schouten.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105996 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8d1cd7c40fa47378a674582dfe5356961ea39c0f 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix PR4062 by dissecting one particular -Wp, form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105966 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
eda3f707fd53f90f4232b0e694d3f5514237aba5 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix PR4062 by dissecting one particular -Wp, form.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105966 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
93a89ae3ec17c53cf32fe05c956eb2145e35f530 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105964 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f78925f633e949f06521d9ffd937019e59f35efc 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Dissect -Wl, and -Xlinker arguments to remove --no-demangle, which was a
collect2 option that is passed by some projects (notably WebKit).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105964 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
23b33f2e28ea00cb7b0651882ef60953a15d1dd3 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate uses of Arg::getIndex.

Also, fix a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105963 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
0e10031ba5d0f9b3e5bc5570f39382d288779ab8 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate uses of Arg::getIndex.

Also, fix a memory leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105963 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
bb35c159dca5dae41dbce319747ad059a2b3eddf 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix refacto in DerivedArgList::MakeSeparateArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105958 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
fdbe65e587b85cf48f093d531a78fa3b2d9961b8 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix refacto in DerivedArgList::MakeSeparateArg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105958 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
bb6d52040bc4a5a090c22a9e2645577d7e9dad93 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105957 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
9d0863b22faef1678eb191bbab7268809be60a96 14-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add DerivedArgList::AddFOOArg helper functions, and switch to using them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105957 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
fb23a09db7bd093cdbe04189530e8c2fe3e644af 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch Compilation to return the translated arguments by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105844 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
be21cd0f07726045367861d3882d18ef30f6a30c 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch Compilation to return the translated arguments by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105844 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
16b4767bacedd8847437aa280cfefae6b75ea352 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
oolChains.cpp
oolChains.h
279c1dbebf37cd128f3c73c70741a6b8c35ad025 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit argument translation phase to the driver itself. We are going to need this to handle things like -Xassembler, -Xpreprocessor, and -Xlinker which we might have to introspect.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105842 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
oolChains.cpp
oolChains.h
50547ce57e1b8081ba7e711554b5ba5aa98cb61c 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Get rid of the proxy support in DerivedArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105841 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
3612bc80fabcdd337f6d1df06e69b38c2c5f5a32 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Get rid of the proxy support in DerivedArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105841 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
b99a26cf2654c84677a7f51e6eccd18282641a93 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Fix a couple comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105840 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e82ec0bead14ae262cddbe958b77767a3f6aebcd 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Fix a couple comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105840 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7f3ffed4dc34e302c96d6ebc2792de362552d105 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change OptTable::ParseArg to take any ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105839 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
785e7963343c91c16e6d7c8f301eee145d06da5b 12-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change OptTable::ParseArg to take any ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105839 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
93917b47ee01d6d44dd5e735ec9275be58af79e3 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
rgList.cpp
ools.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
rgList.cpp
ools.cpp
4bf99130178f92af4eb958837bff9d6266f06227 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
ools.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
ools.cpp
01824fd0db4ec4b725b2503eda64adf834f5be46 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105763 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
3856ab3502676efabceb91fc5ca978810a35aeca 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105763 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
7f7a407f4b95e46125e51b2a11665545a526de00 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate Arg subclasses, which are now unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105762 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
river.cpp
ptTable.cpp
ption.cpp
532c1ec307b8689e95896a11ce5ae4661fa9e5d3 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Eliminate Arg subclasses, which are now unnecessary.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105762 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
river.cpp
ptTable.cpp
ption.cpp
04a157dccba420d25b9b1847dfb553c93f935e88 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep the rendering style in the option, instead of as part of the Arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
ption.cpp
e375c4a02ac6e18b166a067b8226e15a1ab009e7 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Keep the rendering style in the option, instead of as part of the Arg.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105761 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
ption.cpp
410c23d634c4215f04c6623f73e07e682255ccf3 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
4465a776a56de81211ae4672e5782c6bef075135 10-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg to just hold the values directly, instead of implicitly
deriving them from the Arg type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105760 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ptTable.cpp
ption.cpp
f6fd1f35a7115cb9e39f6d3b4abfe772e7ecb608 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105747 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
e5af3b3eef8dd3b2b9516f89825d0f0b4d09c0cf 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Revert "Driver: Change Option parsing to always create arguments referring to
unaliased", this isn't quite right yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105747 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
2d4fb135115d5a972326871e446af705cc6ae05e 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105744 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
22685f40dbb458c0ef18f5fec35f4f7cdb0886c9 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Option parsing to always create arguments referring to unaliased
options.
- This matches the intent of the .td files, and will simplify alias handling.
- PR7321.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105744 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
c8e5d5a1c815da662f5835d678ea6cee428ec174 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
they can be independent of the exact option that created them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105739 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ption.cpp
312a8b726e24078d3bd3b2328f9f895d1407cdb7 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit offset to JoinedArg and JoinedAndSeparateArg, so that
they can be independent of the exact option that created them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105739 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
ption.cpp
3cab29db8caa5feb725752a5ce289882a5646086 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg::render methods to use option name instead of string where
possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105738 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
a3f28c341a1b69fc1b8deefb4f9abd64ac949ec1 09-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change Arg::render methods to use option name instead of string where
possible.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105738 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ed5bf62969af84e508b62c0a9b19756bbfb2ce38 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
c4dec1c58eeb2ef46cdb64120eb6b819c6927afb 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105638 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
e55e5e35d511ea62e635374aeca1c09ba7ce6d88 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
afed099bd2e759efd4bb63fdc525d3445f94cc13 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105637 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
240a452b42fddbd14afc7f6949703f9df9fdb537 08-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105597 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0ea22fdfda0558393950cef5db50d050e3eb1e60 08-Jun-2010 Jeffrey Yasskin <jyasskin@google.com> Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105597 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6da157d078ddaf5126a4011d182ab66294924c61 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105584 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ypes.cpp
6c6424bc0d3b5f080a97b5f6ef4a8d70c38e38f5 08-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support invoking Clang on .ll or .bc inputs.
- We actually pretend that we have two separate types for LLVM assembly/bitcode because we need to use the standard suffixes with LTO ('clang -O4 -c t.c' should generate 't.o').

It is now possible to do something like:
$ clang -emit-llvm -S t.c -o t.ll ... assorted other compile flags ...
$ clang -c t.ll -o t.o ... assorted other compile flags ...
and expect that the output will be almost* identical to:
$ clang -c t.c -o t.o ... assorted other compile flags ...
because all the target settings (default CPU, target features, etc.) will all be initialized properly by the driver/frontend.

*: This isn't perfect yet, because in practice we will end up running the optimization passes twice. It's possible to get something equivalent out with a well placed -mllvm -disable-llvm-optzns, but I'm still thinking about the cleanest way to solve this problem more generally.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105584 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ypes.cpp
a60370589461d6bae92482487f00ce1021aadf11 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105476 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6e90047520c8b4d6daa110bdbdaf15041016bd7c 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Change -dwarf-debug-flags option to pass the original command line
arguments after translation, instead of the -cc1 level arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105476 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
72a13ef8379a9d8f017e2ff2a865a6ee97fd48be 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105475 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
be1cc3eec682ca73361edb4109a7969452d3dbeb 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Model dsymutil properly, as a separate action/tool kind which is
added as the last output step, instead of just hacking it into the link step.
- Among other things, this fixes dSYM generation when using multiple -arch options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105475 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
321ca092f1b9707d18951871de50b731ede84a9f 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit dsymutil action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105474 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
oolChains.cpp
ools.cpp
ools.h
6e0f25483b1a801cd1155ea89c2b725feab16332 04-Jun-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add an explicit dsymutil action.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@105474 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
oolChains.cpp
ools.cpp
ools.h
134b9aac01f1994de77e6b06dc7141b65b96588d 28-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Spell -relax-all correctly when calling the cc1as tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104955 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
469d40ef5a95d0eaddfd541616ad4cd26668e856 28-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Spell -relax-all correctly when calling the cc1as tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104955 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
52a4e6b7d8d454c6656ed8c6c295b261fde77d69 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Update -O -> -O2 replacement for addition of -O0 option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104823 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
473916c038f75fa3b0c51a0bc7afc5b082e5c22f 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Update -O -> -O2 replacement for addition of -O0 option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104823 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1220d1f789ef685f31253da0be018c5ee7390ed6 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -m[no-]relax-all, and make it the default at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104815 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9929800b8dfced61e9c97dc8d6e71e144ebf8acc 27-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -m[no-]relax-all, and make it the default at -O0.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104815 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
98e630f4c358ef30178b94485bf62a39699d1f00 22-May-2010 Daniel Dunbar <daniel@zuster.org> Attempt to make MSVC happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104432 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
5e30b8bf56c41fcfec63ae82ddd461c99f3c4221 22-May-2010 Daniel Dunbar <daniel@zuster.org> Attempt to make MSVC happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104432 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
9eab9dbafb622beb6ad5bdb99b7a429c38e6e164 22-May-2010 Chandler Carruth <chandlerc@gmail.com> Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c304ba341a7daa88da42faf8f86310b764dd7b6a 22-May-2010 Chandler Carruth <chandlerc@gmail.com> Daniel re-educated me about what Alias does and does not do. Turn that off for
'-fasm' and explicitly map from that flag to -fgnu-keywords in the driver. Turn
off the driver in the lexer test for this madness and add a test to the driver
that the translation actually works.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104428 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1b0105891c8dee7de9b0370aa80cf98c2a5daa64 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: When printing a "command was signalled" type of diagnostic, use the
short name of the tool in use, instead of the name of the action that created
the command. The practical impact is we now get:
clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
instead of:
clang: error: assembler command failed due to signal 6 (use -v to see invocation)
when clang crashes on a job that uses the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104417 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9fcbc050a704cc5bb46e1c493940aca7c79aebf9 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: When printing a "command was signalled" type of diagnostic, use the
short name of the tool in use, instead of the name of the action that created
the command. The practical impact is we now get:
clang: error: clang frontend command failed due to signal 6 (use -v to see invocation)
instead of:
clang: error: assembler command failed due to signal 6 (use -v to see invocation)
when clang crashes on a job that uses the integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104417 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2e04bb57a98d2892e80338a9d2f8720f99645e97 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Tool::ShortName, intended to be a human readable name for the tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104416 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
ools.h
3038204fd8f6ff22082dd18e4b12ed252b75a5e4 22-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add Tool::ShortName, intended to be a human readable name for the tool.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104416 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
ools.h
a0a736ed9b59080e615dfea74a661a3954238370 21-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Try to fix MSVC build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104371 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
a5ddbcac1e784d3e438fc6233a9e0f5516dc35ef 21-May-2010 Benjamin Kramer <benny.kra@googlemail.com> Try to fix MSVC build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104371 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
1a39e98a7f17a2ca13bdc3ac69af8427be6a5cd0 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using the integrated assembler for standalone assembly jobs
(or -save-temps), when the integrated assembler is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104282 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
0f602ded589d381c6c3862eae87620d19fd10f47 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using the integrated assembler for standalone assembly jobs
(or -save-temps), when the integrated assembler is enabled.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104282 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d392a11085694f1fc3675e49ccc208dc815679d2 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a tool definition for the Clang integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104280 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
20a9aa50f9a7d4b03f97bc67e96da1d605c309a2 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a tool definition for the Clang integrated assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104280 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
94021a23b85be096d2fbe3b46a7ccddc015bc703 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104239 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
C1Options.cpp
MakeLists.txt
41b5b17445ab3bdf957ebd4be6c8670f09a212a8 20-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/MC: Add 'clang -cc1as' integrated assembler tool, currently accepts approximately the same interface as 'llvm-mc'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104239 91177308-0d34-0410-b5e6-96231b3b80d8
C1AsOptions.cpp
C1Options.cpp
MakeLists.txt
4041ec10a1f4467c0a13b60fa6bc8fd81ebcb9b4 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
rgList.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
rgList.cpp
ac882c2ba621e23a748e5954a090f62b0e220635 20-May-2010 Ted Kremenek <kremenek@apple.com> Expose -fobjc-nonfragile-abi2 as a top-level clang driver option. Fixes <rdar://problem/8007063>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104205 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c3e31d66f1a6f396fb08b0cabfc47c34705c01b1 20-May-2010 Ted Kremenek <kremenek@apple.com> Expose -fobjc-nonfragile-abi2 as a top-level clang driver option. Fixes <rdar://problem/8007063>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104205 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bc34e45429666fec96b31e42d8d06713b7eee334 15-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fverbose-asm the default for platforms where the integrated
assembler defaults to on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103825 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1b71848c5238747ede9650b7907172f8a7e088a5 15-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Make -fverbose-asm the default for platforms where the integrated
assembler defaults to on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103825 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f864bf164022c7eb53adc20c346327c1ffa5368e 14-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Enable -integrated-as by default, at least for Darwin/x86 without -static.
- How else will we figure out what is broken, eh?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103759 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.h
eb840bd0e473ee11622e084a0d6ff276ee7aa5c6 14-May-2010 Daniel Dunbar <daniel@zuster.org> Driver: Enable -integrated-as by default, at least for Darwin/x86 without -static.
- How else will we figure out what is broken, eh?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103759 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.h
0d225d54d4cfdccbaa0fb7e68f3b05b989e5c60e 12-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't support the necessary ABI yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103632 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b30575c22f249c0697df0cd2aa872d14d4fa9c57 12-May-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/i386: Don't allow compiling C++ with -fapple-kext, we don't support the necessary ABI yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103632 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1e1ebfeb0d3f09831d17c0a51c1819e841619edd 12-May-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103631 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6b3d5a65cb486f46604d12a16831e8a228ee610f 12-May-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103631 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
346e9051e81d8c39d0b917a89c8fd4ee15186c87 11-May-2010 Duncan Sands <baldrick@free.fr> VISIBILITY_HIDDEN was renamed LLVM_LIBRARY_VISIBILITY.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103494 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.h
92dd1915842410005c68d32c43bb3b3cf5a4a702 11-May-2010 Duncan Sands <baldrick@free.fr> VISIBILITY_HIDDEN was renamed LLVM_LIBRARY_VISIBILITY.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103494 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.h
dfe1a118ad79275e18f385f45d2860a93f122c41 06-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Handle -ffunction-sections and -fdata-sections in the driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103197 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9cf933a67e54bea5475c5027fee2c1cf7365ee05 06-May-2010 Rafael Espindola <rafael.espindola@gmail.com> Handle -ffunction-sections and -fdata-sections in the driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103197 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5ed9818c4f1e9efae459a35b7d237616ceb52ce0 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103162 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c40f73c6e715044d327409564bf3656254101d46 06-May-2010 Chandler Carruth <chandlerc@gmail.com> Remove a dependency on Frontend headers in the Driver library. Also saves
building and passing arguments to cc1 layer when setting values to their
defaults.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103162 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
654b71fa852b0cc963dc2748142fda6eb3991346 05-May-2010 Chris Lattner <sabre@nondot.org> add a new --print-diagnostic-categories option, which causes the driver to
print out all of the category numbers with their description. This is useful
for clients that want to map the numbers produced by
--fdiagnostics-show-category=id to their human readable string form. The
output is simple but utilitarian:

$ clang --print-diagnostic-categories
1,Format String
2,Something Else

This implements rdar://7928193


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103080 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c3d26cc4eea5187ce13ed180b479ff8ef41015a7 05-May-2010 Chris Lattner <sabre@nondot.org> add a new --print-diagnostic-categories option, which causes the driver to
print out all of the category numbers with their description. This is useful
for clients that want to map the numbers produced by
--fdiagnostics-show-category=id to their human readable string form. The
output is simple but utilitarian:

$ clang --print-diagnostic-categories
1,Format String
2,Something Else

This implements rdar://7928193


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103080 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d7b1b0252ec628aaa782bf0f9dc041f10b1a449b 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
ools.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
ools.cpp
9690fb779e330e800ecbe4af654426df396fb59a 04-May-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
5cfedb1806367a52f8d82af76981e14cfae12274 30-Apr-2010 Ted Kremenek <kremenek@apple.com> Do not enable '-analyze-check-security-syntactic' by default when using '--analyze'. There
are several known issues to address for it should be turned on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102664 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
647aa46a22cda2345dec566c06962da9c54ad02f 30-Apr-2010 Ted Kremenek <kremenek@apple.com> Do not enable '-analyze-check-security-syntactic' by default when using '--analyze'. There
are several known issues to address for it should be turned on by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102664 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f2800bc5c579b96a51407623453f84a2459e75f1 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -fobjc-abi-version=.
- <rdar://problem/7919678>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102559 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5e2a8ac6599f0c68b14afb2f328ac98b264f770a 29-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for -fobjc-abi-version=.
- <rdar://problem/7919678>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102559 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c23ad87d0c805f1aa7fca78aae05d34f3264bac 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102432 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1744a3504af13343f4bc0e566f6d7349fc6e3f04 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102432 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a99c63e4b17bc28e8011b8a23409b2de99284920 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add Driver support for -fno-constant-cfstrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102431 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f35f14d474632142280ec1526d16e87706ce6625 27-Apr-2010 Daniel Dunbar <daniel@zuster.org> Add Driver support for -fno-constant-cfstrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102431 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8bb06dd669d895a61908f58dba2bd8f24f8b9f03 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
- <rdar://problem/7903449>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102257 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
f645aaaf274c2f32c9ace457b9e69f041b565c17 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
- <rdar://problem/7903449>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102257 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
b9421286fab2bf4dc529511a4cb675bc243c741f 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
oolChains.h
ools.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
oolChains.h
ools.cpp
26e524c1449c027b19b48047a741e02dd631e999 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102254 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
40788d909ad52fc732fe0769d0ef22e5edad5e47 24-Apr-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102254 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c693861122503dacd40daf3b2fba092db42513c6 20-Apr-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
1cfbc68a39712b410f0b5859b87b57f9ff749cea 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
ools.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
ools.cpp
2df4c764881df35a74dbfa7cc9fc4effb630810e 17-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add missing claim() for -mllvm options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101618 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fb36d21960a3bd422665a961eac6ca269cd6445b 17-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add missing claim() for -mllvm options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101618 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
53edce7858067abc05bdb3c8ae48fd74dd200cbf 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Tidy up comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101357 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f4046866e20fe3279b0daa2f48d9e83263dfdbfe 15-Apr-2010 Daniel Dunbar <daniel@zuster.org> Tidy up comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101357 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
85a48e3c8e72f61fb888510213917546e6b4fdec 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
ools.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
ools.cpp
f853e7319cfb327c5390166b53f7c5d812bdbf1e 11-Apr-2010 Chris Lattner <sabre@nondot.org> add haiku support, patch by Paul Davey!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100982 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
86ed3a326342fa2a8c9d9b5d1d7280c9bad2b007 11-Apr-2010 Chris Lattner <sabre@nondot.org> add haiku support, patch by Paul Davey!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100982 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b258e3e55cc927c66220e6385dc00a162ed37998 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Only add extra -L paths on darwin if they exist. Unfortunately, this
means it isn't really possible to write the test case for this code, but this is
the kind of thing that really requires testing against the installed compiler
anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100935 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
e3c153a88a21e620446955705a7fc8215b4cc2f2 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Only add extra -L paths on darwin if they exist. Unfortunately, this
means it isn't really possible to write the test case for this code, but this is
the kind of thing that really requires testing against the installed compiler
anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100935 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d7801260901ccfa844f31e9ac8607eba279f3e55 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
43a9b3263cb0bcb050cc75c15b3e6a8951e6b97a 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Ignore -fobjc-gc and -fobjc-gc-only for platforms which don't support them.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100930 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
445e69f06dada0651a83f063d710c99067878792 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/x86: When linking, incorporate -L paths based on the path where
Clang is installed. This is designed to match gcc, and is important when
installed in a non-standard location.
- This is gross, but no worse than ever. It will die when we finally move to
the compiler-rt based toolchain, any day now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100915 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8bc9c550128c0662a04234dc262628c54c76b1ea 10-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/x86: When linking, incorporate -L paths based on the path where
Clang is installed. This is designed to match gcc, and is important when
installed in a non-standard location.
- This is gross, but no worse than ever. It will die when we finally move to
the compiler-rt based toolchain, any day now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100915 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
b96f8525338a111ef908951e873e8d0ea53b8d9b 09-Apr-2010 John McCall <rjmccall@apple.com> Turn access control on by default in the driver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100882 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
32579cf507d088e776b67327c5d6bc46e1f217cc 09-Apr-2010 John McCall <rjmccall@apple.com> Turn access control on by default in the driver.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100882 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4f4bd835ccc14c54177e9e7ad97bbdd09b161630 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
ools.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
ools.cpp
a7f73016ab3560d241c52bac1b107b5af1b903b6 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove caseless switch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100770 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
71c972acd4a2cb5e369e35471dbb719185913cdc 08-Apr-2010 Benjamin Kramer <benny.kra@googlemail.com> Remove caseless switch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100770 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3b432a4a3971302608924758289cf4fe09f527f0 07-Apr-2010 Chris Lattner <sabre@nondot.org> add a new driver-level -ferror-limit=412 option, which causes clang to stop
emitting diagnostics after it has produced that many errors. Give this a
default value of 20 which produces plenty of errors for people to fix before
recompiling but not so many that their entire console scrolls away when the
compiler gets confused. The experience looks like this:

$ clang foo.c
<tons of crap>
foo.c:102:3: error: unknown type name 'somethingbad'
somethingbad x;
^
fatal error: too many errors emitted, stopping now
36 warnings and 20 errors generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100689 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0f0c963f9b7ac6f0176c34d405d48fcb005dfab6 07-Apr-2010 Chris Lattner <sabre@nondot.org> add a new driver-level -ferror-limit=412 option, which causes clang to stop
emitting diagnostics after it has produced that many errors. Give this a
default value of 20 which produces plenty of errors for people to fix before
recompiling but not so many that their entire console scrolls away when the
compiler gets confused. The experience looks like this:

$ clang foo.c
<tons of crap>
foo.c:102:3: error: unknown type name 'somethingbad'
somethingbad x;
^
fatal error: too many errors emitted, stopping now
36 warnings and 20 errors generated.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100689 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1a4ec81e504391316c55160ea8f138a1a7423432 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100529 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.h
60a53f24b160724de0e8dd0e142009981540fd26 06-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add a Tool::hasGoodDiagnostics hook, and use it to simplify logic for
deciding when we need to emit an extra "command failed" diagnostic.
- This also fixes the case where we were emitting that extra diagnostics, even
when using clang w/ the integrated assembler, which has good diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100529 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.h
dd5363786ff4332ede0ec9794026fce405e13503 01-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5d93ed3c7a2dae0a8f422747e269963b3ef11d95 01-Apr-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add support for a CLANGXX_IS_PRODUCTION build variable, which enable
Clang++ support, even in "Production" mode (for testing purposes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100119 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5755054fae2f0e8c32dbbe90d9232f793dfee25a 29-Mar-2010 Chris Lattner <sabre@nondot.org> add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3edbeb78fe5ea7fffea7a94575478cde19e830e0 29-Mar-2010 Chris Lattner <sabre@nondot.org> add support for -MQ flag to quote targets in dependency file,
PR6661, patch by Ori Avtalion!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99821 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1550de47011ada292b3e825d591c44a95a5678d0 26-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment
override to enable use of the DarwinClang tool chain on all platforms (not just
ARM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99660 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
3bc96eb2246cae9c0a7ece1cb051d28313162936 26-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Support CCC_ENABLE_NEW_DARWIN_TOOLCHAIN as an environment
override to enable use of the DarwinClang tool chain on all platforms (not just
ARM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99660 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
16d4b975a57ec29128a54004ed0ec65eaf776670 24-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Implement support for -nostdc++. Fixes PR6446.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99417 91177308-0d34-0410-b5e6-96231b3b80d8
ools.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
ools.cpp
94f61b2913a168065fb88acb4539835cfd797705 22-Mar-2010 Ted Kremenek <kremenek@apple.com> Disable the emission of frontend warnings (not errors) under --analyze.
Fixes <rdar://problem/7405601>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99222 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0647a7b9ad844565b8a4b5e1a5de882dd64efabf 22-Mar-2010 Ted Kremenek <kremenek@apple.com> Disable the emission of frontend warnings (not errors) under --analyze.
Fixes <rdar://problem/7405601>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99222 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0ba0dc0a1a9c868010c0e2b9e03c3a6c4f880b2a 22-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Sort calls to add_clang_library()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99191 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
909e6aaa4f6015ca0cfa0ff32acbc29d37f182aa 22-Mar-2010 Kovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com> Sort calls to add_clang_library()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99191 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
08e30999cc236800c13eb0cfde355499028500b5 22-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
48ad6094679ca2bf4f3593068e02e7a208c1a73c 22-Mar-2010 Chandler Carruth <chandlerc@gmail.com> Add very limited support for GCC's '-B' flag. This allows us to support unusual
toolchain configurations and is a small step toward FreeBSD support.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99159 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
901824fdc1d87753b9cb6ca6dd414bededded32f 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinkos that prevented Clang from picking the right deployment
target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99055 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
84d1e6e443b90275539a4e5b2dd94ae63c5ff19a 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinkos that prevented Clang from picking the right deployment
target when both {MACOSX,IPHONEOS}_DEPLOYMENT_TARGET were set.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99055 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
463110daf084b2a348615e0201fe1065cf915e23 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99054 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
4c00fcdf98d3d7c4cb47b64f8b770f8f4bff1357 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Support CC_PRINT_OPTIONS, used for logging the compile commands (in -v style) to a file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99054 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
0445be5bae75a74c804e829496cd611b2ca7105c 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix -### to quote shell special characters, following gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99053 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
b86c5fc7393f61221686fc56e992ca409dee2a50 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix -### to quote shell special characters, following gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99053 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
22d99092e6c2d7c23fa2b1d93dd15ebab3792624 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of -fapple-kext issues:
- Disable RTTI.
- Disable use of __cxa_atexit.
- Disable unwind tables.
- Enable freestanding mode.

Also, honor -fhosted correctly.

<rdar://problem/7515383> C++ support: -fapple-kext not honored

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99041 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0a80ba74ffa3d3df55abfbc4474d7470c7c923e3 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of -fapple-kext issues:
- Disable RTTI.
- Disable use of __cxa_atexit.
- Disable unwind tables.
- Enable freestanding mode.

Also, honor -fhosted correctly.

<rdar://problem/7515383> C++ support: -fapple-kext not honored

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99041 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e2a6a781c8824ddde4d2d8b2d92ee37cddff8732 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
ools.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
ools.cpp
c18719ff7fa061f78b29ae04acca581ffe9941e9 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate option types.

Also, simplify/fix SeparateArg::render with forced join.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99022 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
bbd2a045871c1acff39c43dffd346adbb1b2dde5 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow Render{Separate,Joined} option flags on JoinedOrSeparate option types.

Also, simplify/fix SeparateArg::render with forced join.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99022 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
3495f34391c4266667f725ec07a333f6e137c721 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix possible crash when targetting an unknown (unsupported) Darwin
platform, e.g. ppc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99016 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
03d87ee556f9e11ab83f6d2f80c9ee92e3667301 20-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix possible crash when targetting an unknown (unsupported) Darwin
platform, e.g. ppc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99016 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
6d6ec3a5a4e5418a4fa2825166ecf59eb58e6ff9 17-Mar-2010 John McCall <rjmccall@apple.com> Make -faccess-control and -fno-access-control driver options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98703 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3ddd6e026a173e9519e84e27f8d6aed5473b8b4e 17-Mar-2010 John McCall <rjmccall@apple.com> Make -faccess-control and -fno-access-control driver options.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98703 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
146db93765420b4594464143f13a24fcda4bf73f 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fno-lax-vector-conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98639 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8c6fa84b2e4a30317b7b214a7657cb593d67773b 16-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fno-lax-vector-conversions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98639 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
81021af73452240c8ac822400dbce9aaf4db99af 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free Action objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98263 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
32c1a2ae8b31f32e478c8e504ed81db8c8d25713 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free Action objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98263 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
061484b534350106d6d5b25fc25f0e56a9075efa 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free synthesized derived arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98262 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
fd48cb31d409cb1f8e1f119426965e498652e2d1 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free synthesized derived arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98262 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
f63023e069af1cf8dd3a890193903b40a73e73c8 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free jobs in JobList and PipedJob instances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98261 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
9d44023453094832ada2770941e9e4c96ce0e75e 11-Mar-2010 Daniel Dunbar <daniel@zuster.org> Driver: Free jobs in JobList and PipedJob instances.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98261 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
fd55b1e5aa39f16a8b054d0d23fb5aa453f6f705 10-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix -Wsign-compare warnings reported by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98174 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
cbc6a631c85722966c01297e67a63d4a67ac8fdb 10-Mar-2010 Ted Kremenek <kremenek@apple.com> Fix -Wsign-compare warnings reported by clang++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98174 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
cd21a3c2f8e53027033f73a901fccc375c9674da 08-Mar-2010 Douglas Gregor <doug.gregor@gmail.com> Remove redundant semicolon

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97930 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
da7914950fe4bab215f40265e3aaba9c489b1938 08-Mar-2010 Douglas Gregor <dgregor@apple.com> Remove redundant semicolon

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97930 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
3a8b818b9e5857df760c331b887e0240a5229c7c 07-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce debug info when given -g. Fixes PR6529.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97897 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
18f36d9eac8b425e8cfed389bbbf02c030f26be7 07-Mar-2010 Rafael Espindola <rafael.espindola@gmail.com> Don't produce debug info when given -g. Fixes PR6529.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97897 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8a1db93ddce4c6d7c81ce433b512806f3ed4f5b1 04-Mar-2010 Chris Lattner <sabre@nondot.org> add TCE target support, patch by Pekka J!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
3a47c4e0a3e8d13ee4fb06cc3a98f9cfa9982400 04-Mar-2010 Chris Lattner <sabre@nondot.org> add TCE target support, patch by Pekka J!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97746 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
03cc0effa96475ca77bfb6d97dfa539cd45d36da 02-Mar-2010 Eric Christopher <echristo@apple.com> Add in some more MIPS command line options.

Patch by Oleksandr Tymoshenko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97544 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
ed734737d5af31906e30e537d4a41c760ddcfc59 02-Mar-2010 Eric Christopher <echristo@apple.com> Add in some more MIPS command line options.

Patch by Oleksandr Tymoshenko!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97544 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
6fcbb37b212f4b27c8f31bd00375056f9b78a5e8 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow driver title (for --help) to be overridden by clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
43302d4144b5291961aa160d2fe191c09a9d8ad1 25-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Allow driver title (for --help) to be overridden by clients.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
48913fa37e15c0644911bffb2282c26aae253f40 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2a7eb28397148079cbc8e54e8a3871ef01c4f4bc 23-Feb-2010 Blaine Garst <blaine@apple.com> Unconditionally support block introspection data in a new field at the end
of the block descriptor field. This field is the ObjC style @encode
signature of the implementation function, and was to this point
conditionally provided in the block literal data structure. That
provisional support is removed.

Additionally, eliminate unused enumerations for the block literal flags field.
The first shipping ABI unconditionally set (1<<29) but this bit is unused
by the runtime, so the second ABI will unconditionally have (1<<30) set so
that the runtime can in fact distinguish whether the additional data is
present or not.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96989 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
30812fb06f4573270e45ee4283ad0e7fd81d5b31 19-Feb-2010 John McCall <rjmccall@apple.com> Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96655 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d0c2ec44e093011256b6a0f57d455f36dffdea70 19-Feb-2010 John McCall <rjmccall@apple.com> Enable -mconstructor-aliases by default on non-darwin platforms.
The linker bug holding this back is Darwin-specific.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96655 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
441f07c35f1038e789a0824ca37f328f4f77d6f1 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
51679c5e4828b8a64953c4f3db162ca963bf7b03 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
a9a698f715ae8f4f9fe81cc9199eba3ec59d9612 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Tweak freebsd::Link, by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2002263e10aa369c89008d37cada2908203fd822 17-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Tweak freebsd::Link, by Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7d63b43c93a2db474e9f6f05dcb8771ba08226f7 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
ools.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
ools.cpp
27ec475aabe1b3d19aeaa5de43483d8ccc310958 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95876 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ae24a88655c461e751d0984cc21dda6e17882356 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix clang -ccc-no-clang -x c++-header foo.h on Darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95876 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
19b2fd19a4059b90844348362168382bd2be13a3 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95849 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
64952508c2b0c8bffb45c8b410f0af3d2457f59b 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -rewrite-objc, which is an interface to clang -cc1 -rewrite-objc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95849 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
84ab5cae9d2df77b92bafd7d9c9e45e3e639a7a9 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95848 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e9c7b9ef2f2054401d099dc7666a4143ef14089d 11-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix infinite loop and wrong message on invalid -ccc-clang-arch argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95848 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
21f7bcaa607ffc73866f7b0c2141f449c2943bbf 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
b2987d159a88ab0ee2e40c884eb4d77b42ab89b6 10-Feb-2010 Daniel Dunbar <daniel@zuster.org> Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95787 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
05326029789a06dbdbf8b3feaada84a7556e8ff7 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
ools.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
ools.cpp
bd9e9c41f75c55177d083502ada1e805aacadc35 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
565e465c6d0093f1bf8414b2cabdc842022385a9 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-checker-cfref' to '-analyzer-check-objc-mem'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95348 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9f0ca58754c1ee46c42fecf5b7b19725a0cd8473 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-missing-dealloc' to '-analyzer-check-objc-missing-dealloc'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95347 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7909fc8833e734aac521d7d6945bd823d75150ac 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-missing-dealloc' to '-analyzer-check-objc-missing-dealloc'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95347 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8d64b4226e42a62d16b9bcaee5a6465e672ac19a 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95346 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fa15be4cf95b7ed2d1df583497b16a6f897cf789 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-methodsigs' to '-analyzer-check-objc-methodsigs'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95346 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
31d76528d2e4c65bbf24a8b03050cb06bddf655c 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-unused-ivars' to '-analyzer-check-objc-unused-ivars'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95345 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2ade536f6815bf6ff128333520232c3b0e701146 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-objc-unused-ivars' to '-analyzer-check-objc-unused-ivars'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95345 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4ce4665ff3801ca93abe5e3c54a736aa30dd1e02 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95343 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cd9902bfb79c5c67559360514951714bdafac36e 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-dead-stores' to '-analyzer-check-dead-stores'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95343 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ea87f3ac2f31f27f154acf097cea3a61d7267c46 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-security-syntactic' to '-analyzer-check-security-syntactic'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95342 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fb3f893bc58071e548c97a3d667c8ab9b0c38cfb 05-Feb-2010 Ted Kremenek <kremenek@apple.com> Rename -cc1 option '-warn-security-syntactic' to '-analyzer-check-security-syntactic'.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95342 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
56cbd4e5ccece0236767469f75a45bf2682b4c82 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -[no-]integrated-as for clang.
- Requires backend support, which only exists for i386--darwin currently.

No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c


ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--

The random extra whitespace is how you know its working! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95194 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
8767cbc475ed96397b6f08617814eeb9cab121bd 03-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver: Add -[no-]integrated-as for clang.
- Requires backend support, which only exists for i386--darwin currently.

No 'as' required:
--
ddunbar@ozzy:tmp$ cat t.c
int main() { return 42; }
ddunbar@ozzy:tmp$ clang -m32 -integrated-as t.c


ddunbar@ozzy:tmp$ ./a.out; echo $?
42
ddunbar@ozzy:tmp$
--

The random extra whitespace is how you know its working! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95194 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
0a113139bfed49a562a14f9b4de1b371400bb66e 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
this is still a popular thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95093 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
39053672d459bff1d3ab1f72a7901f24e3fa542e 02-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Don't error/warn on conflicting deployment targets. Apparently
this is still a popular thing to do.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95093 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
5f9c13dd8204e08957f4e1f18800e4845456f4d6 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95006 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
609508ce95732e7e7010f79c5207613eced7c9cb 01-Feb-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95006 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
3bb930e44f1e367ef617a1b6a168589c42bd8e35 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
ools.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
ools.cpp
1045f50412d6d8a64b811d5552694061c5df4c50 31-Jan-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94929 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
74f20838caa266f829bf5ae43997f8ebfca54a9a 31-Jan-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94929 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6eddb15b9e48f8c0472150493cb4514e3a026f20 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef instead of returning a temporary std::string.

This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.

Hopefully 2 of 4 MSVC buildbot failures are gone now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94892 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f22d1fd96d6056a2f271b0f7353b31f47547127b 30-Jan-2010 Benjamin Kramer <benny.kra@googlemail.com> Use StringRef instead of returning a temporary std::string.

This fixes a really nasty bug in Darwin::getDarwinArchName where we were going
StringRef -> temporary std::string -> StringRef (and return the dead StringRef).
The StringRefs from Triple live as long as the Triple itself, that should be
long enough.

Hopefully 2 of 4 MSVC buildbot failures are gone now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94892 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2404278feba531f840752cf651bce8bbfb36fbfe 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Don't honor -std-default for C++, this makes it hard to run the gdb test
suite with clang++ enabled.

The right fix here is PR6175, although we would still have to find a different
work around for the gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94838 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4a5290e773e70ec2c3b4353a3a4aa7d1a3e3cd66 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Don't honor -std-default for C++, this makes it hard to run the gdb test
suite with clang++ enabled.

The right fix here is PR6175, although we would still have to find a different
work around for the gdb test suite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94838 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c5021deb980f41a900f53fd725fab87dd915675e 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94812 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
1a3c1d9dcfdb199353b68b071b6319724b8e3c31 29-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix a crash when diagnosing conflicting deployment targets.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94812 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ca5a30b4e4cf7676dee95764d774ec9700f42825 28-Jan-2010 Douglas Gregor <doug.gregor@gmail.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
ools.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
ools.cpp
d72710953d6f91b77dd078c4449aacac72c86d8c 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94642 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
5435fc9739e9ac4baede460cf5e7489886948af5 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Eliminate invalid uses of DarwinVersion -- this fixes a number of
defaults when targetting iPhoneOS (blocks, non-fragile ABI, stack protector).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94642 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
4a779335c3b4cd7f36c56b00a7226a464051e7a2 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Simplify target version checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94641 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ce3fdf233353b10f20d74dceda3d77a82285de17 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Simplify target version checks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94641 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
9d6b309e950d449658cf1022ddda43eb59d2caf0 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix a few link arguments when targetting different iPhoneOS
versions to match gcc (which is matching linker changes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94640 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
cacb0f007001f7463d44ebd5dde7bfaecf876a71 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Fix a few link arguments when targetting different iPhoneOS
versions to match gcc (which is matching linker changes).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94640 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
d3bfca495a9c6ea5f04b8aeb989ae0cc94001ed6 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch clang -triple synthesis to use computed target information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94639 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
408fceda7a518ac25975fb6299c856bfaa753939 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch clang -triple synthesis to use computed target information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94639 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5ef81bf48e732d0a0c3c4a5241d45953db0bd50a 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actually
just indicating whether the default target should be iPhoneOS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94638 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
cc8e1894109b7c02258b7f4be5624d3d8d1523ce 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Eliminate confusing IsIPhoneOS parameter -- this was actually
just indicating whether the default target should be iPhoneOS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94638 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
b8caa701881e9a8d9957ba5307bdfff92bcd25a7 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94637 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
251ca6c9fb2bb398d9bf9fe7399c27bed7074b5c 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Switch to using isTargetIPhoneOS where appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94637 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
0a90e53fb3b642b91fb2cfc6dee6c64c44b29fc7 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Track target platform more explicitly in tool chain, eventually
this should just be part of the tool chain itself once we have eliminated
argument translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94635 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
2603137cb91e1d143b36fb71a72189884fbde5b5 27-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Track target platform more explicitly in tool chain, eventually
this should just be part of the tool chain itself once we have eliminated
argument translation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94635 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
115c1db6a7266a66178c9a3ef1a260e53a70360d 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94503 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
314cba02728c451c783b38bf6c00f220afb193c8 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94503 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
71e909ea274771c1cc6e1c8f79c53de36d623104 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
816bc31ed45002de2547d6679b44f31eb85ec491 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Honor IPHONEOS_DEPLOYMENT_TARGET.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94488 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
eab96a269b9c8192426790b9fd0af0d03ea2b6b4 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
21ae3196c9677a79523d294f9a62a4788ba40694 26-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a9721cf7640284820f3bb0ffb20beecf5581f153 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94463 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
82b51cce8cea6b6bb6175c406c2ab425c91d9dc8 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Fix fallback to gcc to -c instead of -S if trying to generate an LLVM bc
file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94463 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
cb94ade2e7569f3f9917e9eae9d046f08e444c1e 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3bd54cc56276c386f4d50940a9fbfcad7a69cb75 25-Jan-2010 Daniel Dunbar <daniel@zuster.org> ASTUnit: Don't check that input files exist when parsing ASTs from the command
line -- they may be remapped (fake) files. This is useful for testing parsing
entirely from memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94395 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f4b34a030729fff07d8a6501bfabbbd097c15045 24-Jan-2010 Chris Lattner <sabre@nondot.org> -fno-rtti is now the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
0bb46d285cb2bb0f582d0935f58f57a9be8bf2cd 24-Jan-2010 Chris Lattner <sabre@nondot.org> -fno-rtti is now the default.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94379 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
7e85de74e7913777cb5fd05b6cf48c8f9bf2cb13 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangFullVendorVersion() to getClangFullVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a18f1b88a7ef3d2c944bb1d3b6586a2860ce2baa 23-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangFullVendorVersion() to getClangFullVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94273 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
aeeeb1c615f2310a76519e54a267b938c8d0ea0a 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
3687a5d83f5deb4b70b0c8e522c455d546f40101 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Move version string generation (e.g., "clang 1.1 ...") to libBasic/Version.cpp, getClangFullVendorVersion().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94235 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
fe942e746bf1b4448c7aec9c8a611d5ecd31db4d 22-Jan-2010 Ted Kremenek <kremenek@apple.com> (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f7a96a39958b3f919f26764777eec948b43d74bc 22-Jan-2010 Ted Kremenek <kremenek@apple.com> (1) Rename getClangSubversionRevision() to getClangRevision(), and
have it return a StringRef instead of an integer (to be more VCS
agnostic).

(2) Add getClangFullRepositoryVersion(), which contains an
amalgamation of the repository name and the revision.

(3) Change PCH to only emit the string returned by
getClangFullRepositoryVersion() instead of also emitting the value
of getClangSubversionRevision() (which has been removed). This is
functionally equivalent.

More cleanup to version string generation pending...



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94231 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ec04e5806acd9ea1fd9daea82595938db0813a2f 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
517e676b9e1524e39beeb47718822f2647801d1a 22-Jan-2010 Ted Kremenek <kremenek@apple.com> Rename getClangSubversionPath() -> getClangRepositoryPath() and have it return a StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94213 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
494ca80f0e094a0ab53af340587545036c71892a 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.

This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--

New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
eec99100f0caa1d71bcc911ce38b9a58a8a43fdc 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin: Update tool chain to use static clang_rt libraries provided by
compiler-rt. This tool chain now works on x86 and ARM, but isn't the x86 default
yet.

This drastically cleans up the linker invocation, old invocation:
--
"/Developer/usr/bin/../libexec/gcc/i686-apple-darwin10/4.2.1/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-weak_reference_mismatches" "non-weak" "-o" "a.out" "-lcrt1.10.6.o" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/x86_64" "-L/usr/lib/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../../i686-apple-darwin10/4.2.1" "-L/usr/lib/gcc/i686-apple-darwin10/4.2.1/../../.." "t.o" "-lSystem" "-lgcc"
--

New invocation:
--
# For 10.6:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.6.0" "-o" "a.out" "-lcrt1.10.6.o" "t.o" "-lSystem"
# For 10.4:
"/usr/bin/ld" "-dynamic" "-arch" "x86_64" "-macosx_version_min" "10.4" "-o" "a.out" "-lcrt1.o" "t.o" "-lSystem" "-lgcc_s.10.4" "/Volumes/Data/ddunbar/llvm.obj.64/Debug/lib/clang/1.1/lib/darwin/libclang_rt.10.4.a"
--

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94150 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3178f78a826a5699c089cbdc9fdaa1ba80b58245 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Fix refacto, -force_cpusubtype_ALL should only be forwarded,
not always added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94149 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8917dd4457affb8750c81f08cbc21902a36cff26 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Fix refacto, -force_cpusubtype_ALL should only be forwarded,
not always added.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94149 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d5da137e30eb25ea4206fb1b210bc2016694c1f9 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" arch
name being used in an driver invocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94139 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
eeff406730f50afd973f005a8d501a19af4785e5 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Factor out getDarwinArchName, for getting the "Darwin" arch
name being used in an driver invocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94139 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
29e2cb7430ea3243743c6da52735411f5c28f6f1 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
diverge from gcc anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94138 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
a6d38494d18e260958e73bfe5e2b3f1dc4160459 22-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver/Darwin/ld: Eliminate AddDarwinSubArch, our linker invocation is going to
diverge from gcc anyway.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94138 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
f41e1800ba8ac1d0cb3d84bfdcb9ba153d5df4b7 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Lift clang resource directory computation to the Driver object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93971 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
225c41706dc0f3682236e351820d339e14390e00 20-Jan-2010 Daniel Dunbar <daniel@zuster.org> Driver: Lift clang resource directory computation to the Driver object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93971 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ef490c93867dd6501b0f286501587128be8747db 19-Jan-2010 Ted Kremenek <kremenek@apple.com> Fix possible memory leak by using an OwningPtr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93834 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4d7b14734f2285695dcec347f8718b512093390a 19-Jan-2010 Ted Kremenek <kremenek@apple.com> Fix possible memory leak by using an OwningPtr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93834 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
543fa6f33ccaaf8bd93f9a2cd4a0b19619b617a9 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Remove ../libexec from clang program search path, clang-cc is dead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93749 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
6cfb3ef451515221cb5a8cf1f952e0230f9eed5b 18-Jan-2010 Daniel Dunbar <daniel@zuster.org> Remove ../libexec from clang program search path, clang-cc is dead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93749 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c02b1d5e506e3ef9b4ec4d5767c744f0186debfa 10-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93087 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
8a0d94d2ef8cbc93f9d6ecae2816c7a8db102f53 10-Jan-2010 Daniel Dunbar <daniel@zuster.org> Fix a FIXME.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93087 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
d616e273f4a2bb5cf227d5f1d116d4c69a1f4220 10-Jan-2010 Daniel Dunbar <daniel@zuster.org> Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' when
-weak_reference_mismatches is not present, it is the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93086 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
52d8f5bd9a7be2e0996d12bd548d302a15553505 10-Jan-2010 Daniel Dunbar <daniel@zuster.org> Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' when
-weak_reference_mismatches is not present, it is the default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@93086 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ba62ebd010101759f34b7b41e73cb1f3650d623d 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
ools.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
ools.cpp
54d54b5a7bae186b56b606382ce36c5724335f13 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
oolChains.cpp
oolChains.h
ools.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
oolChains.cpp
oolChains.h
ools.cpp
51c4c9eaf6a99f50702ab244ab12a5f1b0ddeba3 05-Jan-2010 Nate Begeman <natebegeman@mac.com> Allow clang to pass -x cl through to compiler driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92686 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
edcfc411148e81c644a1ff36a9df8a7b08209a23 05-Jan-2010 Nate Begeman <natebegeman@mac.com> Allow clang to pass -x cl through to compiler driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92686 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
3cc4b35bacf2de5e7ac286b8d0ba949947dc8527 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
54d76db0aa7107597cac0b80d8e138a37e6d1de9 25-Dec-2009 Benjamin Kramer <benny.kra@googlemail.com> Remove some dead variables clang-analyzer found.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92162 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ad1010d663754058b1fa43a0ebe47d27e195d661 23-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> move a few more symbols to .rodata/.data.rel.ro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
2550d70aabb5f603e8f74cc5fb6a69a7af5b51f3 23-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> move a few more symbols to .rodata/.data.rel.ro

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92012 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
65efb84a64f9dc3b448e1ccd289c001ee42aa455 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix '... -O4 -O0 ...', which was generating bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91962 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
73ba9a6337c7879021976949a2dad9476a4f0abb 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix '... -O4 -O0 ...', which was generating bitcode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91962 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
bf57c61ad6225876aeee81c68816bf696f10605c 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop ToolChain::getHost()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91960 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1bda434673d3c51a2ba6b412f100ccfcf3e7083f 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop ToolChain::getHost()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91960 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
86d7ba180bf61e7cbeac3910ae8065e3cfadb34c 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f3601388f234f70778e3023018dfe57b64cf4043 23-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: When linking, don't warn about unused arguments which are obviously only
used during compilation.
- There is no easy way to define this group properly, unfortunately, and maybe
this is a losing strategy. For now this is unambiguous more friendly, though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91940 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
96be2a493357b8172c880889a22d28dfdd0d1c78 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a91320b8af7143f7af4c0665ffa62a3b244c0bd9 22-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91855 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
eed574461aebce1416058a75edc3a35ceb9dfbac 21-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ToolChain::getDriver() and use it instead of going through the HostInfo
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91830 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
ee788e70fcd0adf76103b17c78ac658d4ea30c9b 21-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add ToolChain::getDriver() and use it instead of going through the HostInfo
object.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91830 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
oolChains.cpp
ools.cpp
917c9e1d36105d8b37c8029b15d1e18dd90c17ad 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
7177dee8aee4b432911c91f1b788963bec0cac9f 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> Remove ';' after method definition. Noticed by clang++, which one would think
would have a higher respect for its own code. This is getting old, is this
warning really adding value?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91779 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
48075d80ceef950fedeb7c69bae4e358fad4c231 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Use front-end specific target features "soft-float" and "soft-float-abi" to communicate FP mode to target; __SOFTFP__ is set correctly now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91755 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
97f52ac45369f6925b548404e61d511034c874ec 19-Dec-2009 Daniel Dunbar <daniel@zuster.org> ARM: Use front-end specific target features "soft-float" and "soft-float-abi" to communicate FP mode to target; __SOFTFP__ is set correctly now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91755 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e17d54c995fd5e43e7639ad9a3edb44b30579c30 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
ools.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
ools.cpp
e9756514b410b0ac5afa00cdb4569e1f62f4a7f4 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
oolChains.cpp
oolChains.h
ools.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
oolChains.cpp
oolChains.h
ools.cpp
f33eac538f44f01d3462bf6fb7c0891c80b42311 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
ools.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
ools.cpp
2186f97cb2706eb3bf26b0f5c943e228e4055593 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
ools.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
ools.cpp
00582dfcd1680d6e290973b5d1a2554b1c12ee5f 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass -resource-dir to clang -cc1, since the driver presumably already found itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91384 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5f12232ef39e3d6c36d6600a73ebbe3c4a79f514 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass -resource-dir to clang -cc1, since the driver presumably already found itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91384 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9d02e7c5fa4e30ceb52a2956c0018ec41a5b6da0 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
oolChains.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
oolChains.cpp
669046aad17057d6778610a835f59bc311942f49 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
ools.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
ools.cpp
d67ac076aa2d5921c62174b1b484551a75876bbe 12-Dec-2009 Ted Kremenek <kremenek@apple.com> Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6feaf57b46f0856127c84b03f3aee5fb51d0262b 12-Dec-2009 Ted Kremenek <kremenek@apple.com> Make using '-fshort-enums' an error until it is actually implemented (changes the ABI, so it is dangerous to not error out if we don't support it). Fixes <rdar://problem/7461006>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91191 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ddaa225883899ec9034d19bf9bba40ffed3bdba 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using "clang" "-cc1" instead of "clang-cc".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91174 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ff5b28d6efcffe2251e77634c7edf83a4763344 12-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using "clang" "-cc1" instead of "clang-cc".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91174 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fd665d27b26a1d6e0549b79df0bb433a0d356e76 10-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> spread 'const' love to some variables. this considerably reduces the amount of dirty data around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91002 91177308-0d34-0410-b5e6-96231b3b80d8
riverOptions.cpp
ypes.cpp
68f7a2426227476bcfa33ada70b708c82419dfdc 10-Dec-2009 Nuno Lopes <nunoplopes@sapo.pt> spread 'const' love to some variables. this considerably reduces the amount of dirty data around.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91002 91177308-0d34-0410-b5e6-96231b3b80d8
riverOptions.cpp
ypes.cpp
0646aa214e9a7fb2f7106ddce68309278ff97147 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90873 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
87667aafe68c366be57f5afb60428237593da0ed 08-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak clang-cc handling of -msoft-float / -mfloat-abi=, which I borked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90873 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2ab887915142c46b8c6d5dae98f1e6ec7cb07fbe 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e3fdca2ee0346a41d9cc5ee417a75e66274216f5 08-Dec-2009 Jeffrey Yasskin <jyasskin@google.com> Remove several .c_str() to be forward-compatible with StringRef.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90822 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
edede8d59be4c0c9538d61094e5fa3612f61d284 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Enable '-analyzer-opt-analyze-nested-blocks' by default for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90812 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b40d06dec23b53bbc1157a9adae7f887be31aa3b 07-Dec-2009 Ted Kremenek <kremenek@apple.com> Enable '-analyzer-opt-analyze-nested-blocks' by default for testing.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90812 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
65494fab0e4c7463ea2c3706bbdcbbcaa132876e 07-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
7ca7987669fcd14d91b4227a9ddcf7fdd8b1f8c2 07-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Shorten the help test for -no-canonical-prefixes, put it behind HelpHidden and
claim it in Driver.cpp instead of Tools.cpp.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90777 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b65bff24e8a9a4bc0e09e3b5560561d220c5f156 05-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90629 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f5431e3563a64758584906cb9e0d10719a0756ec 05-Dec-2009 Daniel Dunbar <daniel@zuster.org> Unbreak -ccc-cxx and -ccc-clang-cxx defaulting.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90629 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
fcd71df22e090cbc65ac9d92773016886d392d29 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch -ccc-* options to using the standard options functionality.
- I still want to get rid of them, but manually handling them isn't adding value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8477ee93c9d81d1b5fe321706ff95bcd219c744b 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch -ccc-* options to using the standard options functionality.
- I still want to get rid of them, but manually handling them isn't adding value.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90602 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e985d447b2bcbe764b27dfc8e6b34462b563c33a 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
2658f05caf1c1d86608a46ebc7be0b3bb21fef2a 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptTable: Allow option groups to be used to define "help groups", which will
collate the options inside that group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90592 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
973c39d43eeb03c50792b691a5e1d33da95d6d6d 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptParser: Add HelpHidden flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
9a242512a8b319cc4df7d050166a1c65bf66abeb 04-Dec-2009 Daniel Dunbar <daniel@zuster.org> OptParser: Add HelpHidden flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90591 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
617eef3b2e1175b6f9f90a138a4b79282061745f 04-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Add gcc's -no-canonical-prefixes option to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0f4c59c3beae302b5a3ecea13f2e257bdaad3188 04-Dec-2009 Rafael Espindola <rafael.espindola@gmail.com> Add gcc's -no-canonical-prefixes option to clang.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90577 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3a18adf860cd4efb7e8b10346539ae374f61607b 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix Clang tool translation to forward -fvisibility as separate arguments, the
old syntax isn't supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ba8d86172c8d9e2476c6fd2415731639223174c5 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Fix Clang tool translation to forward -fvisibility as separate arguments, the
old syntax isn't supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a1bac7d03c52b8639ebb4523fcbbaabf37667c85 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add OptTable::PrintHelp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
60e107fb86132fea75b886d2259f4c220334bc5e 03-Dec-2009 Daniel Dunbar <daniel@zuster.org> Add OptTable::PrintHelp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90420 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
0e67ae0b7deb99e13a4af5b4774fb0084be7cff4 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Command::Creator member variable, which tracks the tool that was
used to create a particular command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90287 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
ools.cpp
daab7b1016f0a82fefa4f7be6e63c57c06b19ffc 02-Dec-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Command::Creator member variable, which tracks the tool that was
used to create a particular command.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90287 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
ools.cpp
5042795243266b33fef08663983912de6dff125c 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
C1Options.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
C1Options.cpp
a3f4eeff4aec1306447707c73f70a5657357422c 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
C1Options.cpp
ools.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
C1Options.cpp
ools.cpp
859ca768772b4fc644107ab40254cc9202f510ae 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Fix initialization of PreprocessorOptions::TokenCache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90126 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
39ed0b6f258db653024125b58f6c60cbea8b7176 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Fix initialization of PreprocessorOptions::TokenCache.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90126 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
4f9e3c21a23093f7e3417c0bd07e7f9a79dcfd20 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Fix -include-pch now that the test code is in clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90124 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
43030a79db7f1aa465b03fc3904e31127feebd7f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Fix -include-pch now that the test code is in clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90124 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
a340b9d6d3c3fbd832b0a52375e3834c550da30e 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Initialize LangOptions::{Optimize,NoInline}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90123 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
1c5944c77383b1f3cbf33ea9c656880c0bd42eff 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Initialize LangOptions::{Optimize,NoInline}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90123 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
ce2c2b65f61a4410102d5481f43e83c51240bf2b 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Always pass -fmessage-length using separate arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90121 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a28690e5b0e423a6287ebe3a5565fd1896d7ebff 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Always pass -fmessage-length using separate arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90121 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7461763ba73d4a5eb7496e858faecbc272e3f888 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Initialize LangOptions::DollarIdents correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90120 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
2d8f3e83cc29f018a302c5a3f0d85765c6c889ef 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Initialize LangOptions::DollarIdents correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90120 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
8736980d77112c3bdb2b4d366d94b9ead0d3519f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90119 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
1bc5c03a7f08b04f4ac26abd705418aaf4109062 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't try to generate common globals for C++ files, instead of depending on the FE to set NoCommon, and simplify CodeGenOptions initialization.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90119 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
8d9cacb67dd4f30fc20b2f1e2773390ea5c58d77 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::TimePasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90118 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
b33fbaa5f14452b6dc2442e89266acb0810616fd 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::TimePasses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90118 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
eeef8220155ad20d50065b5315ea30a83c05a64f 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90117 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
3636e1d784aedb37052aa235966e4fdbe7ed9082 30-Nov-2009 Daniel Dunbar <daniel@zuster.org> Eliminate CodeGenOptions::SimplifyLibCalls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90117 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
abbbb983c8f7c7f74ace2a531cea346c788f03eb 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Use proper diagnostics for all parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
9e612408c237ce3cac3fe7e97d7ce564601c1f63 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang -cc1: Use proper diagnostics for all parsing errors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90100 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
06779965fc91f7c594e49cb077018761bf8849c1 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
e03245246acbec5c46e93b68ec6942ce42b9e256 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to report errors using a proper diagnostic engine.
- Clients that care about having the diagnostics output honor the user-controllable diagnostic options can buffer the diagnostics and issue them later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90092 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
60788e86724178e222f5e9a9a8e1d96f97a1e477 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
545c28117c64e78521b8b402caa060ba0b58a530 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> Change CompilerInvocation::CreateFromArgs to take Argv0 and the address of main (or something in the main executable) so it can find the builtin compiler files.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90090 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
e8dd73706cf9c9a2b7b9dce818a7637ef3fa24de 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
C1Options.cpp
ools.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
C1Options.cpp
ools.cpp
5b8c7f0e66b4d802d850430aca5baadc43f811ba 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
C1Options.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
C1Options.cpp
b24efa95d4dae2888cdcbf27fb6e7cc3297a83ca 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7674352cf3e8f699914a2f739f1ae8c8c3480813 29-Nov-2009 Daniel Dunbar <daniel@zuster.org> clang-cc: Change -fsigned-char=0 to -fno-unsigned-char and pass -pic-level using separate args.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90054 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
42c06b5340576b23978aaea160013c7edbb2b27f 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
C1Options.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
C1Options.cpp
c371191dd8ddef4f63999662c44866bf3c840ade 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove header which is bringing libAST in (on MSVC).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89946 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
3fc7e450e2314b9fc47ddf01edf2744f8f7b3729 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Remove header which is bringing libAST in (on MSVC).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89946 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
05ebd194218aeceb941b6c5f31e0c9600b8f40ab 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix thinko (-fno-builtin != -nobuiltininc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89918 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
6a50ad5c3b1ef136f006e4cff0e22cf97747dab4 26-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix thinko (-fno-builtin != -nobuiltininc).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89918 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
72dfa8de67f5b374caf4cd72908285d46aef052a 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
C1Options.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
C1Options.cpp
aa0b635db9b7c09031e2f116ccfa00fec5051674 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
C1Options.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
C1Options.cpp
1cac905e89de668a6ad094f94a949b27827036d1 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> What the FIXMEs want, the FIXMEs shall have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89861 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
cdd9686b890ebdc10039ae256ef4c9dfb5ebacb7 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> What the FIXMEs want, the FIXMEs shall have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89861 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
4943af3df02880f6e6db197e6050ff188abe0011 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add an arg_iterator, for iterating over a subset of arguments in an ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
3b84f5bab9f134741cf4d3c80086009519b6d968 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add an arg_iterator, for iterating over a subset of arguments in an ArgList.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89860 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
e750d4a82645109039df1a34e999e4d03a9cc6d5 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
C1Options.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
C1Options.cpp
05748d89be4182c6382742343a811375ca146b4b 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for preprocessor output options (-E).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89854 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
6379476cded63b47fab61de83efc1c9f000317d4 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -cc1 parsing for preprocessor output options (-E).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89854 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
749e7aa7d5408b0762cc3627ef109605f82c1068 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass -fexceptions=0 (it is the default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89853 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6d2eb4d07d40795131f28d719ef9146a2be500f6 25-Nov-2009 Daniel Dunbar <daniel@zuster.org> Don't pass -fexceptions=0 (it is the default).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89853 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d1ca14e12ef8ac9eeafcb97a6bd4b9045c0634ec 25-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89849 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
98873ec17c35cac3b1e2b1f7fa3d04aadd54548b 25-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for Path::isSpecialFile to Path::isRegularFile API in rev 89765.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89849 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
1de64118b3f9306ea3b70200a58c9ce703653299 24-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR5568.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89766 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
56eec2bc2188574459a514f3650d581e00683126 24-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR5568.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89766 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
4b756410f4c0f06cbcd901cfeface345816289c8 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89721 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
33a33d8abd7a3d49eacc05e40c00b00634bf1ee9 24-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch the rest of the clang -cc1 option definitions, aka fun with C-x C-(.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89721 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
27d0014be2d42ace977745f5d232ea1359f1847c 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
C1Options.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
C1Options.cpp
050a920a59bd70a85faa793058721c59c61c8e4c 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Recognize .hpp as a C++ header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89630 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
90cb920bfa167ae30cea35fe296533e7779f4ee2 22-Nov-2009 Daniel Dunbar <daniel@zuster.org> Recognize .hpp as a C++ header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89630 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
0fd696eb70d53f5135a62fbec67bbf1ada621293 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
C1Options.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
C1Options.cpp
b92b6fc24ddb1bfdef5fa5ef7d9fb2a7cf016e2b 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix refacto, gcc's cc1 needs to see --output-pch=, which is not just an alias
for -output-pch=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89534 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e6c9ae147835fb450a90800bd378420c0e5ffb35 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix refacto, gcc's cc1 needs to see --output-pch=, which is not just an alias
for -output-pch=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89534 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1a21a63ef46cda04659418aee51314641860bfe6 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 dependency output options parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89508 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
1bed0c3a555d9e32de9dead55658b4a28a4d6e03 21-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add clang -cc1 dependency output options parsing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89508 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
e57bf1d80dc8e70add82f4a40a0c8014aa92e800 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
20be8c4551d49fe66835baf1200be85ac2fd0c86 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch CompilerInvocation::CreateFromArgs to take const char** arguments until Driver itself switches to StringRef.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89503 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
32d9526bd9375a5078b811053fbe7573699e80d4 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
ools.cpp
a31100e62f83933432df9092a04e48f9e5561a14 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
ools.cpp
bc4b678f5ef9d2a447d5660267b60d1f62f01de2 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89497 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
66861e09d590994a8b941eaa328e4d8f33adec9e 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89497 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a1a1086a21b5126cb786905bc1c8dfd6d5599d72 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
C1Options.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
C1Options.cpp
e1dbc37bcd8fd50ca8d24c0860fc7a8c23417520 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89435 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
31db76cb2dde031ab3262808ac233889daf7d720 20-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add parsing for TargetOptions to CompilerInvocation::CreateFromArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89435 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
61985cf402d2ab2347c1d103ccc07c25e2935ff5 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
C1Options.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
C1Options.cpp
5e0594fbfee826dc8766317aaae775b25dff8dd1 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89371 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
riverOptions.cpp
a08304a38c2fecd647f41039d2245f0c4cd33504 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move INPUT and UNKNOWN sentinel options into the OptParser.td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89371 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
riverOptions.cpp
c1eaa1937c1be4708483db907c0e39d96b848b88 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing dependency for CMake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89332 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
c06a8d8f3120ac93a36b77a4e59e5ad7c4fa56c9 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add missing dependency for CMake.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89332 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
163b52ba0a0954e6a04a1bdfdcc58d87565e7c7a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch .td file and build system goop for OptTable based clang-cc options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89330 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
MakeLists.txt
8adfcff02334455b6f95bc4e1f347204f7c0dd3e 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Sketch .td file and build system goop for OptTable based clang-cc options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89330 91177308-0d34-0410-b5e6-96231b3b80d8
C1Options.cpp
MakeLists.txt
2d944943497eca819e239dad3c320d61923cef26 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out OptTable::ParseArgs, for parsing an entire argument vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89327 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
847abaa62883b6c20005bdd3346ebbd44e46dbac 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Factor out OptTable::ParseArgs, for parsing an entire argument vector.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89327 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
5867a8f2ebdf1e72d98a86b401c4e2bb54c0208d 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm::cl::init(true) arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89315 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
53e8484581ca358c3a2ccd8ea39c136c6e85d606 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Switch -f{builtin,math-errno,rtti} and -analyzer-purge-dead to -...no... variants instead of using llvm::cl::init(true) arguments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89315 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
469415844fdbb50242c9a5836628732adab05098 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList doesn't depend on Options.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
oolChains.cpp
ools.cpp
265e9ef9f3ef30a97790e6e7bbc3c17d97981ca7 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList doesn't depend on Options.h anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89313 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
oolChains.cpp
ools.cpp
0cefb592b02535db64382a15da204b7b770e56e5 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89312 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
a0289fda5b5d67ad49596a5e1f62e1f9db497d06 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Take option ID for {Input,Unknown}Option, to drop dependency on actual options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89312 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
ef9c002425bf3acfe3659ab08de01b3abec0cdc1 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce OptSpecifier class for protecting access to an option id.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
9e1f98260a1842df4bb8e6de0b592a1622dcfdc0 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce OptSpecifier class for protecting access to an option id.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89310 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
0d76dea24f8314ee742905e062b2ee538b90bd1a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
oolChains.cpp
ools.cpp
e4bdae78c69d2a09ee96619cc5ccf81441674412 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using explicit {getLast,has}ArgNoClaim functions instead of taking a Claim argument.
- Most driver code always claims, and bool arguments don't play nice with the overloads.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89308 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
oolChains.cpp
ools.cpp
d6678af9737c6700ac613964d955496f0636f44b 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve inconsistency in matching options against options which are
aliases -- just treat this case as an (unchecked) client error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89306 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
b32aa51ce9b608002a031e8ca682f073e28024cf 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve inconsistency in matching options against options which are
aliases -- just treat this case as an (unchecked) client error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89306 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
3bf5d3d27d77bd0cf9a7ea28ded06f7f3c91075a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use Option::matches instead of direct ID comparison.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89305 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
ools.cpp
b827a0541b5fd095fcdb7ad0c3df93ca158c619a 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Use Option::matches instead of direct ID comparison.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89305 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
ools.cpp
7e37793a51f1a6ad5d4369177235a3e3a52ddce3 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89288 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
riverOptions.cpp
64bdce3f02091b0a4e1528d690495970c1249803 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using TableGen'erated Options.inc instead of Options.def file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89288 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
riverOptions.cpp
dd7c00f2ae32ea2c1cc955b122ec45ced6d9b149 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split OptTable out into OptTable.{h,cpp}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89283 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
river.cpp
riverOptions.cpp
ptTable.cpp
oolChains.cpp
27e738d0d3f781672a5999d2a9e2827b00a97d0c 19-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split OptTable out into OptTable.{h,cpp}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89283 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
river.cpp
riverOptions.cpp
ptTable.cpp
oolChains.cpp
4d95e63c2d509c31d58d0ce0f86939602da88139 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make MSVC happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89247 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
1ce9cf06b6618b5a1e9d96995f914f48fe92bec6 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Make MSVC happy.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89247 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
df3ee13cdbbbd68e45b31f97dd71197575b65d55 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rework OptTable to have no dependency on the options it manages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89234 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
a79a2b5bf23d1422eed9be3793186ebbba7532ec 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rework OptTable to have no dependency on the options it manages.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89234 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
a8d0db1c321912acd07d8bcbe0c5f1eb2c7ab3bf 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make local type name more distinct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89233 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
d8e0e4530bbfd7ee346f9e7447db61110bbc9e77 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make local type name more distinct.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89233 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
1e427b002936650c300beb45e6ffbaa6654e3d40 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Store Option ID field as unsigned to drop dependency on the options
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89232 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
oolChains.cpp
1d189e187b1bf7d7677aefd7482bcdad29683a0c 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Store Option ID field as unsigned to drop dependency on the options
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89232 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
oolChains.cpp
c4db6723b8630f6a5184e9e8b70b41b374484c7a 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
into a string).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89212 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
a4f64805e032fa6a669434ca3f9c04b02f1bbd97 18-Nov-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch Options.def to storing flags as a bitmask (instead of mangled
into a string).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89212 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ba2e7682b520666a43d3d02a1d298ea19dd437dd 18-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89205 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
69203e108b097695c421561c8f1b45b498f5e5d4 18-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix passing stdc++ correctly in the FreeBSD toolchain support, Credit to Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89205 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
93e324813bd8c55ac19aaac0123eb4e294a6fa44 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5e530af5d51572a0ed5dbe50da54bd333840c63d 17-Nov-2009 David Chisnall <csdavec@swan.ac.uk> Added block type introspection support.

As per Fariborz's suggestion, committed now but can be reverted later if the used flag is problematic for Apple.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89134 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1339191d4d6dc66f2c7ba2b206064a61bcb6449a 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89065 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
9e5cc6b703b2d0013f13800c2ffbeb3cf85fcfad 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add -fblocks, -stack-protector, and -fobjc-nonfragile-abi defaulting to driver,
instead of using getDefaultLangOptions.
- Remove unused -fobjc-tight-layout while at it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89065 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
96baada03b8e62d21f644f89953736fed5a9afa2 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add driver::types::isObjC predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89064 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
77544fde702fdab2a6150ba812ecf04eb1e6eab6 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add driver::types::isObjC predicate.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89064 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
e6c9f54d16b0af0c3962d456dbc37699d0ccde08 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
ools.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
ools.cpp
2614ec30662bebbb1b9b7a4fa4c82eb5f5fc34b0 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89057 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0be42c44f0199c5023b542d6a6d2e66eb594f27d 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89057 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8d1811b3c8c69167225f8a22614fdcde3a13d105 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89053 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1f95e6567faab67f4363d650f73121359c4bdbab 17-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move char-is-signed defaulting to driver, instead of using
getDefaultLangOptions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89053 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
aa6599b4dbab32b684137cafe593bac04d8fe193 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -mcpu=native support, patch by Roman Divacky, varioustweaks by me.
- We still need support for detecting the target features, since the name
doesn't actually do a good job of decribing what the CPU supports (for LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88819 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f86feddbd5b13d2c144132e35d608fa630784dbb 14-Nov-2009 Daniel Dunbar <daniel@zuster.org> Add clang -mcpu=native support, patch by Roman Divacky, varioustweaks by me.
- We still need support for detecting the target features, since the name
doesn't actually do a good job of decribing what the CPU supports (for LLVM).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88819 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ac02727fb46a72f2a592afd73989f90b2e0e5181 08-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86459 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
76e80c0e960ae7873c08d1d9e11a9b5d3af0042f 08-Nov-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for FreeBSD toolchain in regards to CPP, Credit to Roman Divacky.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86459 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e65800a6496207b51379f92540789206b990781e 05-Nov-2009 John Thompson <john.thompson.jtsoftware@gmail.com> Adding -fshort-wchar option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a6fda124bf380479529d6a80b84b62cacd3cb707 05-Nov-2009 John Thompson <John.Thompson.JTSoftware@gmail.com> Adding -fshort-wchar option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86167 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
89f30234228a3cc1cb5b221ad7fa6a1742beec80 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fcolor-diagnostics logic to driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86014 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
838be483dcf10ea3f2acd85f2cd65adc310011f9 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move -fcolor-diagnostics logic to driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86014 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4a4ff6d72713f9d414053745081ed8ad46982071 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move logic for selection -fmessage-length= to driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86013 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
55efe142a84b2aab6d0186c20a311c347a65f794 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Move logic for selection -fmessage-length= to driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86013 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e14d9f2e98d7b8e461121f44a70d0d3bd282a55b 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86011 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
294691eb1caf551083acd7b08630ef21c3fd760d 04-Nov-2009 Daniel Dunbar <daniel@zuster.org> Fix indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86011 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cb368453a76478fcc07a8c08b94aa2311ea3c410 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
59876c2713683d1538ca45bb14c2f415862fb716 04-Nov-2009 Tanya Lattner <tonic@nondot.org> Merge constant array and structures. This will create a global variables for arrays and structs that are constant and their initializer is constant. It is on by default but can be disable with the flag -fno-merge-all-constants.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85991 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a054adf6f7e7edcd096f57b8e21d54c79574dc89 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e6113de52df132b89c3a5a6141f17d37e83322ae 03-Nov-2009 Chris Lattner <sabre@nondot.org> Implement support for the -undef command line option, patch by
Roman Divacky! PR5363


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85932 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5a6a39a09fce1d963858e24a440ee102b677de81 31-Oct-2009 Mike Stump <mrs@apple.com> Fix -pthread on dragonfly. Patch by Sascha Wildner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85679 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4d63f8bc2686d5d7580324407854f2ca7c128832 31-Oct-2009 Mike Stump <mrs@apple.com> Fix -pthread on dragonfly. Patch by Sascha Wildner.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85679 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d6ba18327f134ce07d92df9ec30b0c3ed06981e3 30-Oct-2009 Daniel Dunbar <daniel@zuster.org> Change the driver to do the Darwin triple mangling itself instead of forwarding
-mmacosx-version-min and -miphoneos-version-min to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85600 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dd4fe00f03d8749b283948ea86aa1e4a53ed21ab 30-Oct-2009 Daniel Dunbar <daniel@zuster.org> Change the driver to do the Darwin triple mangling itself instead of forwarding
-mmacosx-version-min and -miphoneos-version-min to clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85600 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0d4f009eee427aa3f1111843d7c1f9ab6a1adb4e 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove some obsolete or unnecessary FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85475 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ee848a73e5f8ffe7511af8652ba811c020d1c7a0 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Remove some obsolete or unnecessary FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85475 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
24ee7aeb7792fd13473819681b71bc2694d07356 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
- clang-cc doesn't care about their relative order with other -W options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85473 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6e8371eb97a08f724be22ae6042d1e9eacbe4c48 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
- clang-cc doesn't care about their relative order with other -W options.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85473 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d03023da99d813303def57fdee8bd32f7de1826e 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Kill off MakeFormattedString helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85472 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f7fb31f4751c9c5ac3d9f93c19ec05a74dd9546f 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Kill off MakeFormattedString helper function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85472 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e91c15fe1a18434b313f3de05d983c60227169ba 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Reject -I- in driver instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
607d7f6d8f21066cc48bbe2c51e6ca412a00943f 29-Oct-2009 Daniel Dunbar <daniel@zuster.org> Reject -I- in driver instead of clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c8b341387d08c892ce91c1dee0c5410e541e2f99 29-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> [llvm up]

Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85461 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ypes.cpp
55d3f7ae512875a1d6402943c3a619633feb2a18 29-Oct-2009 Douglas Gregor <dgregor@apple.com> [llvm up]

Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85461 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ypes.cpp
cb8f4dd020a403eb618ca29ae85f2989c67f7378 28-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR4887, Credit to Jonathan Gray.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85392 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e7e18200e614a5e619602a088544c85ac8305a1f 28-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Fix for PR4887, Credit to Jonathan Gray.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85392 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bc328239ed5ed2cf460741e225f7d1df0bb9cd9f 26-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Rename -nostdclanginc to -nobuiltininc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85116 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8d737cc78cb28f39179d6c7ca00eb5d3cf563129 26-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Rename -nostdclanginc to -nobuiltininc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85116 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
749efcd4a0f2dbf064f2ad034ed9f4bc023e1f2b 22-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in logic for finding gcc's tool chain directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84805 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
080fb19301b1d0ce4149d99b8961e77f7ed4bb2e 22-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in logic for finding gcc's tool chain directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84805 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
415978ab0113a3292f222387988169aab51a65fb 21-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Driver: don't produce bogus osx version numbers if no version (aka 0) was specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84781 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
87f9fd90ca08348d2a058c526760688e17208daa 21-Oct-2009 Benjamin Kramer <benny.kra@googlemail.com> Driver: don't produce bogus osx version numbers if no version (aka 0) was specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84781 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
624676451e61fa80a25582ad75e81f3ae813e6e2 20-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: If unable to find the gcc tool chain, try the next OS rev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84656 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
74782b066ecfb0ee05b34ef3a29e24d39c59c1bd 20-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: If unable to find the gcc tool chain, try the next OS rev.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84656 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
731df5af9fee56245dbf97f24fad495fec834cb8 19-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> AuroraUX toolchain should call GNU assembler not the Solaris assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ff430e6d68d1bea07046adafa28a52b314eeaa88 19-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> AuroraUX toolchain should call GNU assembler not the Solaris assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d2a30f8bddd68d342ef2f8513e26206cb4c5b24d 16-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> dynamic linker arg is incorrectly invoking gnu ld arg syntax instead of svr4 ld syntax in AuroraUX toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84266 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3cecc19f606ba1000da885b8ff4c089abad224dd 16-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> dynamic linker arg is incorrectly invoking gnu ld arg syntax instead of svr4 ld syntax in AuroraUX toolchain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84266 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
346491115a709ff0d3b0b18759d296359d09b3f9 16-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> fix -ansi in c++: it means -std=c++98

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84254 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
528365d3189d27f3a90a4012baaa8b2814e0a231 16-Oct-2009 Nuno Lopes <nunoplopes@sapo.pt> fix -ansi in c++: it means -std=c++98

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84254 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8ace12449fad45ad894583f59c41d13223ea4fc8 15-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: Default to using PTH for C++ precompiled header support, PCH for C++
isn't implemented yet.
- <rdar://problem/7297571> Clang should use pretokenized headers for C++ PCH
files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84197 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0ebd9321ba380471010341f24c874f46f56e7581 15-Oct-2009 Daniel Dunbar <daniel@zuster.org> Driver: Default to using PTH for C++ precompiled header support, PCH for C++
isn't implemented yet.
- <rdar://problem/7297571> Clang should use pretokenized headers for C++ PCH
files

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84197 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a194695df4e2812e0ceb8f92f52902bb534bbcde 15-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> AuroraUX toolchain fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84176 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
7adf94906e23eae295a006659c55eab9ffcf8b37 15-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> AuroraUX toolchain fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84176 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
5582818626c9eacaa4a9e22e91c2a4249ae2514f 13-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> -funit-at-a-time is the default however some current makefiles pass -fno-unit-at-a-time which is ignored by GCC, we should warn about this not error out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83976 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c37691068db5ceb19c014ddd3e02afa9875f8181 13-Oct-2009 Edward O'Callaghan <eocallaghan@auroraux.org> -funit-at-a-time is the default however some current makefiles pass -fno-unit-at-a-time which is ignored by GCC, we should warn about this not error out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83976 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
079deff5492bb3d380f3b013e4458d5096952735 09-Oct-2009 Mike Stump <mrs@apple.com> Allow customization for the version line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83652 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
5b8cdb524fb06a5c35ba0d9dd9cdd437a50fd2f5 09-Oct-2009 Mike Stump <mrs@apple.com> Allow customization for the version line.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83652 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
ec0240c63cbf1e94db49fc2dd03c33988925ba53 09-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Installation of Clang libraries and headers, from Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
14ea5696417a8e8d244a07091284cdeba57c6d4d 09-Oct-2009 Douglas Gregor <dgregor@apple.com> Installation of Clang libraries and headers, from Axel Naumann!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83582 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
ebd2c07506dc45b53200f88179c729dbe9841c2e 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Revert r83443.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83451 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
akefile
oolChains.cpp
oolChains.h
55bac5339154cedc7541b5648f9c3486e547b45c 07-Oct-2009 Ted Kremenek <kremenek@apple.com> Revert r83443.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83451 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
akefile
oolChains.cpp
oolChains.h
7f4cabfda5481036f6b96f4a1f23cc054a7cbf1c 07-Oct-2009 Mike Stump <mrs@apple.com> Fixup pathnames.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83443 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
akefile
oolChains.cpp
oolChains.h
44da821078a5f09127a01f9aa01dd9dd9af9de86 07-Oct-2009 Mike Stump <mrs@apple.com> Fixup pathnames.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83443 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
akefile
oolChains.cpp
oolChains.h
020092eede29117ae1af0854b9e6efaae9f426b2 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the -nostdclanginc option to clang (the driver).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83377 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6961fdd661f75b8452f526143b9f60b54e175c9d 06-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Add the -nostdclanginc option to clang (the driver).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83377 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
45e728a16a4ed8662ae0b051940f4a984ce520a6 05-Oct-2009 Douglas Gregor <doug.gregor@gmail.com> Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
b8d1191fdeb4eec9bc5cf9bf4b027add0fb467b3 05-Oct-2009 Douglas Gregor <dgregor@apple.com> Provide a common set of routines in Version.h that return Subversion
branch/revision information. Use that information in the driver,
rather than one-off branch/revision computation.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83321 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
d822b69d5118ca8d917cb8e392a382e949adcfbe 01-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Set __EXCEPTIONS by checking on darwin's triple.
Patch by Rafael Espindola.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83209 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
85caf03ee49c4de87ee9624a9b725ef5d20ee624 01-Oct-2009 Fariborz Jahanian <fjahanian@apple.com> Set __EXCEPTIONS by checking on darwin's triple.
Patch by Rafael Espindola.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83209 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0ec79cd78ccdcb79d5bc4d6889481aad091d8f6d 01-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Move the "needs exception support" logic to clang. This also fixes
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83199 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f759df06d997050559fd925758bcd2cdef24db05 01-Oct-2009 Rafael Espindola <rafael.espindola@gmail.com> Move the "needs exception support" logic to clang. This also fixes
-fno-exceptions in C++ code. We used to always define __EXCEPTIONS in
C++.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83199 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
203798b6f3aa585d050cb9b8acc0f9e07e2b33c7 29-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
libexec, *blush*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83086 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a92ba278fd0cc1679a9e3b6ca9aaf0713cd8fe6e 29-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix truck sized thinko where Darwin/ARM toolchain didn't look for programs in
libexec, *blush*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83086 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
082682c06bcaff270a2a6f204eb000589b1b3d6e 25-Sep-2009 Ted Kremenek <kremenek@apple.com> Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82752 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b8bb3e797c5687715c6d9d960ee573e4d0e62230 25-Sep-2009 Ted Kremenek <kremenek@apple.com> Turn on 'RegionStore' as the default store manager both for 'clang --analyze' and 'scan-build'. Leave 'BasicStore' as the default store manager in 'clang-cc'. While there are still known warts with RegionStore, it's ready to be tested by general users.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82752 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
62a09c2ac45fc86c21edd303209096de84b28cf0 23-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push "clang-is-production" logic up to tools/driver, and make it hittable by
defining the CLANG_IS_PRODUCTION Makefile variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f44c58563286bb448a72ed9c9af5f21718633230 23-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push "clang-is-production" logic up to tools/driver, and make it hittable by
defining the CLANG_IS_PRODUCTION Makefile variable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82583 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
000489ca99f97e4fd1cd7963e5db6b69534eec9f 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Split Darwin toolchain into Clang and GCC Darwin toolchains with a common base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82213 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
1d4612b829500cbe04a2eafca74afac703e34934 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Split Darwin toolchain into Clang and GCC Darwin toolchains with a common base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82213 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ac95cf996ecdce857bb07a92cf4092bf0425621c 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift AddLinkRuntimeLibArgs into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82212 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
6cd4154b9088fa18ae05d11c0f3140fafd76c734 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift AddLinkRuntimeLibArgs into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82212 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
310831dd173f1518c15ea925894398a262aad6b6 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move isMacosxVersionLT helpers to Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82211 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
608d04cb7bee2db28c8689f6626bf9e0b114c473 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move isMacosxVersionLT helpers to Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82211 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.cpp
f1097fe6c1a634ac2ee7f97eb886f5fab9b2073b 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift getMacosxVersionMin out into Darwin ToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82210 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
48d5aae4387f07aef99dbe03f4047d709e9f4d35 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift getMacosxVersionMin out into Darwin ToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82210 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
692425a37379d213943e52ee1c240ac0e2d7cf8f 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift AddLinkerSearchPaths() into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82209 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
6b200b2b698b6ac9e310f2225c69c85d28ae4fb0 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Lift AddLinkerSearchPaths() into Darwin tool chain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82209 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
e31d9613ce6e6e15a4d3192b80d6eddb73d7327e 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename a variable to match its semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82208 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ae54af2fdcf2262e778f551941541913828fde49 18-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename a variable to match its semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82208 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9b14b4772577e07188dd09d5c75628f86b4eafcf 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change -O to mean -O2, -O1 is meaningless.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
20f0eacf1682e4594da9d318b5b13ed4f6d6e7e5 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change -O to mean -O2, -O1 is meaningless.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dd5e046ff2d1eeeec5642d2a5f2cd8ba3a1298ee 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve driver error message when only running the preprocessor and an input is
already preprocessed.

--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--

<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82120 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
634b24563be901f8adc37c07ffba3eeac1f1d4cc 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve driver error message when only running the preprocessor and an input is
already preprocessed.

--
ddunbar@giles:tmp$ touch t.i
ddunbar@giles:tmp$ gcc -E t.i
ddunbar@giles:tmp$ clang -E t.i
clang: warning: t.i: previously preprocessed input unused when '-E' is present
ddunbar@giles:tmp$
--

<rdar://problem/6813375> [driver] driver prints confusing message when running -E on preprocessed file

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82120 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cb1f661a2b3c6ab54e0e35d331823b34a44bbfc1 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> We don't need a -compile-ast clang-cc action, we can just use -S.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82105 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e3b8d07e02861d245612b02b5f5a2c1f34b2a394 17-Sep-2009 Daniel Dunbar <daniel@zuster.org> We don't need a -compile-ast clang-cc action, we can just use -S.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82105 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
20ac9a54ff498700f23fb8aec651c63fba1c062f 16-Sep-2009 Daniel Dunbar <daniel@zuster.org> Incremental improvement to logic determining whether we emit unwind tables or
not.
- PR4932.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6bea73b3305a03479589e2642fbdcf6c096851aa 16-Sep-2009 Daniel Dunbar <daniel@zuster.org> Incremental improvement to logic determining whether we emit unwind tables or
not.
- PR4932.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
88439e1b2ae2a57887dd0233d0f5a59b67173684 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Support -mabi= for clang/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81734 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2030d8f46b4226fa99e59389e3ca856a79c27e9a 14-Sep-2009 Daniel Dunbar <daniel@zuster.org> Support -mabi= for clang/ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81734 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3f361b5c731e14d7fa08efd76a93f2f912e66e73 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f4aa4f61de7d364364dc94bbf83ff71448a11327 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Swizzle the target triple based on -mthumb, and update clang-cc to recognize
thumb-foo-bar as an ARM target.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81497 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
27d83340140f245595bf5542fe478466dbafd152 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81471 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cbd1933f83e2332b2d7add10459f80cc4e7eb7bf 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Initial handling of -m{soft-float,hard-float,float-abi=} for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81471 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
655dcbf2f85fb51eb0e6a002b0b638d41dad76cf 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81470 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e6ad3f9fceef0ecc422ff26754ea069a5fd18c69 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move X86 handling of -m[no-]soft-float and -m[no-]red-zone into AddX86TargetArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81470 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a8e9367fa1ed2ad641611268800811f7bc6011e2 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change getLLVMArchNameForARM to just get the suffix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1d65e4be6f22f7e4b4974efbaef92fa3454f1ec8 11-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change getLLVMArchNameForARM to just get the suffix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81469 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
13f51ecea0dbf204db0fdd04d4b24df0362d4f5d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add code to mangle the triple for LLVM on ARM.
- I think we should get rid of this distinction though, but I need to discuss with the interested parties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81435 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
728a512753d85a6ccaae34e81385c8665c2de0e1 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add code to mangle the triple for LLVM on ARM.
- I think we should get rid of this distinction though, but I need to discuss with the interested parties.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81435 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f9147fc4deb6648f8d88c87fb901f412ff7af0b6 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81430 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f84a4a469d8a45c76cb941595582a0fd3b9b15d3 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Don't pass -fno-builtin-str{cat,cpy} to clang-cc, I forget we don't support that yet. PR4941.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81430 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
06c810423d652c45f086696486380688d60a9fe5 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM: Pass -mcpu to clang-cc based on -march= and -mcpu=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81429 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
b163ef7e7a5d904ef0962a7c38c460be083c4d63 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> ARM: Pass -mcpu to clang-cc based on -march= and -mcpu=.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81429 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
05b416eb4bcf019f3affa0538ed5d11992e12a0f 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81425 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2ba91575905a54f712a7f64304e56002e4882499 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement Darwin/ARM behavior for defaulting to -fno-builtin-str{cat,cpy}.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81425 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3200047fb3e40ac24f261595c4055e65d28c5af7 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add a check that -static is not used with -dynamic or -mdynamic-no-pic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81421 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e2fd66418eca3d70cf6b62087d745d0c5181db69 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add a check that -static is not used with -dynamic or -mdynamic-no-pic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81421 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
71bffb026b06e838316596b87ab02c9e49094bed 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Factor out CheckPreprocessing options to share between Clang/CC1 tools.

Also, fix forwarding of -C/-CC to cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81420 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
88a3d6cf5ebab81614f89ba48a8d89023270637a 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Factor out CheckPreprocessing options to share between Clang/CC1 tools.

Also, fix forwarding of -C/-CC to cc1.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81420 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
93de9ba7363265a3b96bb0f3073bfcae1d0579de 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve Darwin argument translation to match what the driver driver does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81391 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
84ec96c8a810df59de4052368beab29f13456707 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Improve Darwin argument translation to match what the driver driver does.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81391 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
2bc247dc9775252c1e43b09e2af17b2d79822ff7 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move Clang X86 cpu/feature argument translation into AddX86TargetArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81390 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
6acda16e9c194dcbd0dea64341e182bdb65d0f41 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Move Clang X86 cpu/feature argument translation into AddX86TargetArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81390 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
7b3d2c8ede936b03a654a528aed3b9a93360ba2d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Get{File,Program}Path to return an std::string (instead of a sys::Path).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81389 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
ools.cpp
5ed34f4c58b6ad4e21038d713c1fae31a6146ff5 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Get{File,Program}Path to return an std::string (instead of a sys::Path).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81389 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
ools.cpp
63dc95186fc471a6f9ffa9d5ea36b71664f0330e 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove gratuitous use of c_str().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81388 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
881376467c46c5c6cc16fa6790271c2c22e1d4f1 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove gratuitous use of c_str().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81388 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
51a1c1476031cc025ffa811b312c1dd234187be1 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use Twine concatenation instead of llvm::format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81387 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
302e2eacf6334eaf18308c4820d2e2b116adfd5d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use Twine concatenation instead of llvm::format.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81387 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e7171d56c29e99aa55990880bb1a424d30421aec 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81386 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5b750fe6189a41937ff2b080a983c95ea273769f 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81386 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d60f9d826e2cce7fb980b9494ccace4abb0d1ef6 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> StringRefize ArgList construction of ArgStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81385 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
16484afe5ca790d2f9a16650638e54067c037d7d 10-Sep-2009 Daniel Dunbar <daniel@zuster.org> StringRefize ArgList construction of ArgStrings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81385 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
b76a9002a557a6c8296483024a9a4a39ea207cf7 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use AddDarwinArch for passing arch name to assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81368 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cc6f803f98fa6ba9a9c366400210448516d01b3c 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Use AddDarwinArch for passing arch name to assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81368 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2c3116437e5ae772eb8b73b413cf1b12405430cf 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add DarwinTool base class for all Darwin tools, and move AddDarwin[Sub]Arch there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81367 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
fbefe6bd6f62a3361813498dc672ab0d6c0d4fd1 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add DarwinTool base class for all Darwin tools, and move AddDarwin[Sub]Arch there.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81367 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
1301bf756f8243177a493a3f151571b864a94d5f 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into TranslateArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81366 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
oolChains.cpp
oolChains.h
0dcb9a3705743ec972af37f48ead81a0939e3958 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into TranslateArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81366 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
oolChains.cpp
oolChains.h
cc50b82fa5f3547471a0eab4f7b74ae870a30551 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into Compilation::getArgsForToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81365 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
4954018954bbc97363eef02d0c83bea19ce9b329 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Push bound architecture name into Compilation::getArgsForToolChain.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81365 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
25cf760b54d3b88633827501013bc51a29b28aba 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
rg.cpp
rgList.cpp
ompilation.cpp
river.cpp
ostInfo.cpp
ob.cpp
ptTable.cpp
ption.cpp
ool.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ypes.cpp
1eb4433ac451dc16f4133a88af2d002ac26c58ef 09-Sep-2009 Mike Stump <mrs@apple.com> Remove tabs, and whitespace cleanups.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
rg.cpp
rgList.cpp
ompilation.cpp
river.cpp
ostInfo.cpp
ob.cpp
ptTable.cpp
ption.cpp
ool.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
ypes.cpp
96460f7ccb29d505e7071a5432f290de45b77907 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Darwin toolchain lookup to use llvm::Triple.
- -2+1 FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81282 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
7ef7f133dee7c2d5cfc97a9f6aa6dbc45435cb7b 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Change Darwin toolchain lookup to use llvm::Triple.
- -2+1 FIXMEs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81282 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
f985dabfc82c71996bdb97015fd7df817fe59182 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Validate arguments to -arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81281 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
36df2904354ac150500ec16238a1ec3cce4ba83e 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Validate arguments to -arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81281 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
31a70e9cf8a025ebe368b23f08ebfdc85fa9749a 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
the default tool chain when binding the default architecture.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81279 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
d7502d0a662b5c299125aba04245aefce67cbc22 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename HostInfo::getToolChain to HostInfo::CreateToolChain, and don't recreate
the default tool chain when binding the default architecture.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81279 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
522d6de0d6d61723f5fd81af00ffa6882d0f5354 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Delete trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81278 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
fe8aa47fb6bd4e1feb59d7615fb5948293cde91f 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Delete trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81278 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
f881baedea0d2bcaf0ff21e4614487a136743463 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81277 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3f30ddf680df44e0c5c43b8db0a22166dcd7066b 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81277 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a28b9d49dc8fa8247da173a83cf9d2d5d28add04 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix ShouldUseClangCompiler to use llvm::Triple.
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81276 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
a6046bec7fc835186dde134fb81aa1b7d45cd9f0 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Fix ShouldUseClangCompiler to use llvm::Triple.
- -1 FIXME, and fixes 'clang -arch armv4t ...', for example.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81276 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChains.cpp
84f695a440f616c6bfdb8b119faf5c330c6aa111 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak & reflow comments, and delete trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81275 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a82318332c9e9b61d3d17371e675ca2859877ee5 09-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak & reflow comments, and delete trailing whitespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81275 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
18f85bf7a515dec523bc234b70ceb2bda8b8de12 08-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove FIXMEs for pedantically-gcc-bug-compatible behavior.
- We aren't going to fix these since they haven't caused problems in practice.

- Similarly, don't forward -object to Darwin ld.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81224 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e0be8b1729d8978de433d229c065830b95d0ae68 08-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove FIXMEs for pedantically-gcc-bug-compatible behavior.
- We aren't going to fix these since they haven't caused problems in practice.

- Similarly, don't forward -object to Darwin ld.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81224 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8b052d5b81dbfb051424493f23ccc939ed955444 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Merge libgcc spec changes for darwin::Link::ConstructJob.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81022 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ae33f8ff4749dd69060c70dae15e68e454dc3011 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Merge libgcc spec changes for darwin::Link::ConstructJob.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81022 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bc56aa3e51bac38cea6c6dbb2406ea5c094c41c2 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Link::AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d82f8fa53771b454885c546f0fd452a4980b3a3e 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Link::AddLinkArgs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81021 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
455bf703e26c1bb65057e65c27fb697ce6d72507 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement darwin::Link::AddDarwinArch for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81020 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
78dbd580a02759bbc408dbefb6754afa71b2c24c 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Implement darwin::Link::AddDarwinArch for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81020 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2c4c46111288ae15480105e7ef688fe5f65677cc 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Darwin: Pass -iphoneos-version-min to ld when building for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81019 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
30392de4681602f1aabc61b0184b1de53bc172f0 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Darwin: Pass -iphoneos-version-min to ld when building for ARM.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81019 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
c0cc871734eed037d07dc02c53fafe2162c7de88 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add -ccc-install-dir option for faking installation path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81017 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
da64141338da59bf477b5db5e333d6eade8e5fa1 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add -ccc-install-dir option for faking installation path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81017 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
57c63bb4c31788ef73675cb9e5a6fc74bfe4a93b 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81016 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
f395528158379e7ea9f6ff4bbb791abadca15aab 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Rename Darwin_X86 toolchain to just Darwin, this can support all platforms.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81016 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
eac73b6c0347444d6dc4e1532a89d9a5f40f62f4 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81010 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.h
8f28962de22867d372e5e454c33dcaaede860482 04-Sep-2009 Daniel Dunbar <daniel@zuster.org> Remove unused argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81010 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.h
62a7cbc34a427d95d86fb35c69ac073c252465a9 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add basic support for -pthread.
- Patch by David Chisnall, with PCH and Darwin support mixed in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80883 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5345c391c65d1780a0d7b0102b7f735cc3f82732 03-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add basic support for -pthread.
- Patch by David Chisnall, with PCH and Darwin support mixed in.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80883 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
df96c8f00738afe95fc62b49a67097f386f80801 03-Sep-2009 Mike Stump <mrs@apple.com> Update.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80864 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4f711c449adac405e1524b23ad44a0b5ee188929 03-Sep-2009 Mike Stump <mrs@apple.com> Update.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80864 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ec4380002e5ed2527ae3f21c7841a4391f6319e3 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80678 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ypes.cpp
5915fbf310e171c4cd3c2af05e9de360c0fa988a 01-Sep-2009 Daniel Dunbar <daniel@zuster.org> Add driver support for -emit-ast and AST compilation steps.
- <rdar://problem/7185031> Add 'clang' option '-emit-ast'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80678 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ypes.cpp
cd118e609b2bd1abedf9a99b543770a425597e20 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8a5a9aaddb627c0884c2ed8db55cc29fdb601195 31-Aug-2009 David Chisnall <csdavec@swan.ac.uk> Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80591 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
42517bcaffeea3cfd4b31346ecfe951d037cb2a3 25-Aug-2009 Daniel Dunbar <daniel@zuster.org> PR4766: Don't pass -static to 'as' on x86_64 on Darwin.

Also, do pass -static even with -dynamic on i386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79948 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0e2679d29be70186fc1197a1484948ed239922ba 25-Aug-2009 Daniel Dunbar <daniel@zuster.org> PR4766: Don't pass -static to 'as' on x86_64 on Darwin.

Also, do pass -static even with -dynamic on i386.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79948 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f34fb81653cad43584642fe181fed54931eeab5e 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove arch normalization from Driver, this should be unnecessary now that
things have moved to llvm::Triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79902 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b1e5e661bbb980bad6134253636c8e500b7af356 24-Aug-2009 Daniel Dunbar <daniel@zuster.org> Remove arch normalization from Driver, this should be unnecessary now that
things have moved to llvm::Triple.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79902 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
31bc304905ece1072f5029eb821e309aecaf88f4 24-Aug-2009 Chris Lattner <sabre@nondot.org> API changes to match llvm ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79868 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d57a7ef9252964bc6c8471451d7bd395b0520cb8 24-Aug-2009 Chris Lattner <sabre@nondot.org> API changes to match llvm ToT.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79868 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d83eaa0e25f99308e20277a775a4d3e34e61db0c 23-Aug-2009 Daniel Dunbar <daniel@zuster.org> Reenable clang using clang-cc for C++ and all archs by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79861 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8bde505fad92a44a853f5697a4fd8d2b52f20119 23-Aug-2009 Daniel Dunbar <daniel@zuster.org> Reenable clang using clang-cc for C++ and all archs by default.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79861 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
89301fbae9c834c6ade835703e58b73a79911396 23-Aug-2009 Daniel Dunbar <daniel@zuster.org> Temporarily switch clang back to not using clang-cc by default for C++, and only
using clang-cc on i386 and x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79859 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4a1240825acceab51facaa0dd9e8c344dca70155 23-Aug-2009 Daniel Dunbar <daniel@zuster.org> Temporarily switch clang back to not using clang-cc by default for C++, and only
using clang-cc on i386 and x86_64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79859 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
50353f11e6421455826f76023b745df8284938c9 23-Aug-2009 Douglas Gregor <doug.gregor@gmail.com> Don't install Clang libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
7ebe97166a4d720a187ab08ba927027e0d32274c 23-Aug-2009 Douglas Gregor <dgregor@apple.com> Don't install Clang libraries.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79824 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
b68ac567934bb139c5ac01d6eecf9d1b56a59964 22-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Second half of, clang, AuroraUX toolchain support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79713 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
e7925a075f110ab21afeae084670a155dea568e3 22-Aug-2009 Edward O'Callaghan <eocallaghan@auroraux.org> Second half of, clang, AuroraUX toolchain support.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79713 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
94390f35bdca3bd0ed04f2cedf23c941a0bfc517 06-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add additional library paths for Linux distros on mixed 32/64-bit systems.
- Patch by Carl-Daniel Hailfinger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78272 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
a9822de3a446940274584083c883c21873e89a6f 06-Aug-2009 Daniel Dunbar <daniel@zuster.org> Add additional library paths for Linux distros on mixed 32/64-bit systems.
- Patch by Carl-Daniel Hailfinger.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78272 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
c3fec03aed25832258dd8cad9373c155bf34976a 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix -fno-omit-frame-pointer bug Eli noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78233 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
21656ddae8e81df04f142386337cb95a9e0f0971 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Fix -fno-omit-frame-pointer bug Eli noticed.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78233 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0063d7392510dc0a567c59415b27bc0a2f299f2c 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78190 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8e9ef0d87dad25f02e5abc6facf528778236115a 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78190 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7c3c0453bc77deb3c95adce7fbe99833c72e1019 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78188 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
091038cbdeab8933720a4b236ab41590fa02d78a 05-Aug-2009 Benjamin Kramer <benny.kra@googlemail.com> Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78188 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
035e1352b2cadab1cf08958956c50b4d05de8109 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Driver/OpenBSD: Improve ld options.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77935 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2bbcf669742b6b27748414e22f8042236fceef65 03-Aug-2009 Daniel Dunbar <daniel@zuster.org> Driver/OpenBSD: Improve ld options.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77935 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
00df7d348c16573732c70302816164952173d239 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
738f8c278da5950d0d4607de2debe0bdfad64185 01-Aug-2009 Mike Stump <mrs@apple.com> Add beginnigs of rtti generation, wire up more of -fno-exceptions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77751 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4738c6af0a3ff412d629934a37e189777b33178f 24-Jul-2009 Ted Kremenek <kremenek@apple.com> Have 'clang --analyze' run syntactic static analysis security checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76996 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
11727519fbdaec68f526ae7c54a83d0a4601f561 24-Jul-2009 Ted Kremenek <kremenek@apple.com> Have 'clang --analyze' run syntactic static analysis security checks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76996 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
422ce672f919a4ad70c4102d4f71f437c45af1c8 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.

- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76886 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
dfaf4b3ac898bc40d928af693990769e98738793 23-Jul-2009 Daniel Dunbar <daniel@zuster.org> Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
- This is a good default for development & testing; for example without this
any tests using 'clang' in the test suite will fail on PowerPC, since the
driver will avoid using clang.

- We don't want to actually ship something built this way, but that should be
handled via some sort of configuration file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76886 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e00f1cd9586335e759d978ab82a2942cd307f2d4 21-Jul-2009 Daniel Dunbar <daniel@zuster.org> driver: Print --version on stdout, to match gcc.
- Patch by Jean-Daniel Dupas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76632 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
793007242ba209b68ce14ec7547ac70ee981303a 21-Jul-2009 Daniel Dunbar <daniel@zuster.org> driver: Print --version on stdout, to match gcc.
- Patch by Jean-Daniel Dupas


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76632 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7e92d3516490f5edfc60903e573342020d54ef4c 14-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75690 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ceb5c5b7f67a30fae305d1d19b478b623e4fbced 14-Jul-2009 Eli Friedman <eli.friedman@gmail.com> Remove -ftraditional option, which gcc doesn't actually support. Make
using -traditional and -traditional-cpp with clang an error because
it's unsupported in clang and causes a significant change in the
semantics of the language.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75690 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
10fbd72634a0a413d0bec0b324d348b52eb3e5bb 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
in array value-initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75518 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
47393ba7caff1db4f90f57db83a2dfcf373d79d3 13-Jul-2009 Daniel Dunbar <daniel@zuster.org> Explicitly initialize the options array, MinGW's gcc 4.3.5 appears to have a bug
in array value-initialization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75518 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
3ee12aed6dce6dab954485b4f6e6d391bab96588 07-Jul-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74885 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e650c8c3bca2f58cad8ffa8aab63126d26e890cd 07-Jul-2009 Douglas Gregor <dgregor@apple.com> Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74885 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
26ad3cc5525b6b1f0b976d40c87e92f683e6aaa5 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Mark some Compilation members const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74636 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
df35d7f1916140bfed5ab0bad2d5e2bc62c667e5 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Mark some Compilation members const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74636 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
9fbdc88d76875026f396eda8715ad38c95f248e8 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74634 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
c88a88f6f7672b6bb831dce9da4acfa0c846975f 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of
logic in it.

- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74634 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
c78c5f628d39cd289dbab82e119310116c2d6072 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Improve diagnostics for failed commands.
- Not all tools give good error messages, and sometimes the tool can fail w/o
any error (for example, when signalled).

- We suppress this message when the failing command is the compiler and it
failed normally (exit code == 1), under the assumption that it gave a good
diagnostic.

For example, for a linker failure we now get:
--
ddunbar@lordcrumb:tmp$ clang a.c b.c
ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--

For a compiler crash we get:
--
ddunbar@lordcrumb:tmp$ clang t.i
Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573.
0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38
... stack trace and virtual stack trace follow ...
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
--

But for a regular compilation failure we get the usual:
--
ddunbar@lordcrumb:tmp$ clang c.c
c.c:1:6: error: invalid token after top level declarator
int x
^
1 diagnostic generated.
--

- No test case, not amenable to non-executable testing. :/

- <rdar://problem/6945613>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74629 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
31c11ebdaab0acfa10e231730ae95e32c0e39e1f 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Improve diagnostics for failed commands.
- Not all tools give good error messages, and sometimes the tool can fail w/o
any error (for example, when signalled).

- We suppress this message when the failing command is the compiler and it
failed normally (exit code == 1), under the assumption that it gave a good
diagnostic.

For example, for a linker failure we now get:
--
ddunbar@lordcrumb:tmp$ clang a.c b.c
ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--

For a compiler crash we get:
--
ddunbar@lordcrumb:tmp$ clang t.i
Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573.
0 clang-cc 0x0000000100f1f1f1 PrintStackTrace(void*) + 38
... stack trace and virtual stack trace follow ...
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
--

But for a regular compilation failure we get the usual:
--
ddunbar@lordcrumb:tmp$ clang c.c
c.c:1:6: error: invalid token after top level declarator
int x
^
1 diagnostic generated.
--

- No test case, not amenable to non-executable testing. :/

- <rdar://problem/6945613>


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74629 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
0d34d4298cdd3eef01b933e199d2ba2191a90963 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74627 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
ools.cpp
cae087e164e94e4286c11bf694dd0ff88f295302 01-Jul-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74627 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
ools.cpp
64c77a1c70299f698a657361a247f12a503782fb 29-Jun-2009 Daniel Dunbar <daniel@zuster.org> OpenBSD support.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74453 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
f7b8eec37c8c8012fa525c71fb29a58c9f29beef 29-Jun-2009 Daniel Dunbar <daniel@zuster.org> OpenBSD support.
- Patch by Jonathan Gray!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74453 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
e1d4f5d6840e99b8345dd755ec4a335ff4539fcf 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
45483f7a1b3e57b4603b141bee80596b2d4dd443 28-Jun-2009 Bill Wendling <isanbard@gmail.com> Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74405 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
d5d096e5861e3b291f1f170a716a622fd28e06a5 23-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Fix some TableGen-related dependencies for the Clang CMake build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73976 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
3c092bce5fb4523854c3429e0af44f99c6fe2b92 23-Jun-2009 Douglas Gregor <dgregor@apple.com> Fix some TableGen-related dependencies for the Clang CMake build

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73976 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0753762135a753f942001b5b5b6ebbe7de07e549 18-Jun-2009 Douglas Gregor <doug.gregor@gmail.com> Add some missing CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73700 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
0adea828ec9db09bf54ca4efa54b2a2f688726b5 18-Jun-2009 Douglas Gregor <dgregor@apple.com> Add some missing CMake dependencies

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73700 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
41c34b312faf10438a0ed17b3a3730e5b7af272a 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Stub out printing of the thread model with -v.
- Turns out libstdcxx greps for this in configure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73582 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3ee96baa3fff269e145855a6f7526c36e59a7f4b 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Stub out printing of the thread model with -v.
- Turns out libstdcxx greps for this in configure.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73582 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
329aa991e15f0092bc0685f9d57748a9450db18c 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fake support for -print-multi-*
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
12cfe036d809173a25af0104844d4bb66a92252b 17-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fake support for -print-multi-*
- I think we will eventually need to support this for realz, and some build
processes seem to depend on these options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73581 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cb7e1e133101c0bf5f263dee68f07a5227ab6162 16-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in prev commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73556 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
407899b5adb148db36ae918810efc444d7948a39 16-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix typo in prev commit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73556 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
5b518b4416f824afdb6c0537c380e65704b501ad 16-Jun-2009 Daniel Dunbar <daniel@zuster.org> Darwin/Driver: Also look at -arch command line options when finding the default
tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73555 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
f2edbf3a5c0595a61c48ab820602a73f779c64b9 16-Jun-2009 Daniel Dunbar <daniel@zuster.org> Darwin/Driver: Also look at -arch command line options when finding the default
tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73555 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
7c6611d499c9cd7dea213189f65cb06c85904078 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> Forward -C and -CC to clang.
- <rdar://problem/6945384> Driver should pass down -C and -CC


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73087 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3a183d3d46426d8719031553131b8928f50aa606 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> Forward -C and -CC to clang.
- <rdar://problem/6945384> Driver should pass down -C and -CC


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73087 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3575e26e2b42bbd30d1d4a46ec193b104e408f0a 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> PR4016: Forward -fno-show-source-location to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73082 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
75eb1d64784946a37fc0b27596e2d92b6cf7033b 08-Jun-2009 Daniel Dunbar <daniel@zuster.org> PR4016: Forward -fno-show-source-location to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73082 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
62c2cca67194cb05e2c66a6637cb21e433726f1c 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
acebb397fa5d63835a0de9cee144987057ec1333 06-Jun-2009 Devang Patel <dpatel@apple.com> Set function Attribute::NoImplicitFloat appropriately.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72961 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c395f022aa8dd748f3c82a1cbdddddbf41de0949 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add driver support for -fsigned-char/-funsigned-char.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72930 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5a77973d9bc2c9cdbdb7860dcf3ac795abe258ec 05-Jun-2009 Eli Friedman <eli.friedman@gmail.com> Add driver support for -fsigned-char/-funsigned-char.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72930 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
cca1e501443ff060a8a30949de27c281e3dd115e 04-Jun-2009 Edwin Török <edwintorok@gmail.com> forward -fno-color-diagnostics to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a46c71abb1dc2f9758ad1abe3378534fe138e802 04-Jun-2009 Torok Edwin <edwintorok@gmail.com> forward -fno-color-diagnostics to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72856 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
32690c128823c16dfd655c4e5cb3409b7e4c2588 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4308: Fix support for -m32/-m64 on Linux.

I'll look into cleaning this up a bit as a followup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72794 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
4e2567d6b1d9d046ca98aa3ab6a6b06ea5ea398b 03-Jun-2009 Eli Friedman <eli.friedman@gmail.com> PR4308: Fix support for -m32/-m64 on Linux.

I'll look into cleaning this up a bit as a followup.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72794 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
a67ac1e5d9f51606b13c5ce7f0052cd33b8fd056 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -mllvm; this just forwards options to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72780 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e5280286573d4fe1220cdd66e147b572a05536a8 03-Jun-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -mllvm; this just forwards options to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72780 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9295ba35a19604a2c0b48eb31dc14b7970ed2929 02-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix rare failure of .ver-svn creation, it has a dependency that the output
directory exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72704 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
af979374818cb94cfabba8ec95f13ddae58a7ba5 02-Jun-2009 Daniel Dunbar <daniel@zuster.org> Fix rare failure of .ver-svn creation, it has a dependency that the output
directory exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72704 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
4e9a40e586dd9c052b30cd671eb7e43a69288b80 28-May-2009 Eli Friedman <eli.friedman@gmail.com> ARM is a legitimate Darwin architecture; don't assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72538 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
8ea975496c849707ebdf51eca984b6e715f3222b 28-May-2009 Eli Friedman <eli.friedman@gmail.com> ARM is a legitimate Darwin architecture; don't assert.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72538 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
8cac4352ef388e935be9735fc3b1d75acf8e7d11 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4140: Add the start of a Linux toolchain (basically, just
barely enough to get the given usage of -print-file-name working).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72412 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
6b3454a219cee5ef36c4668961f93a5c32deab61 26-May-2009 Eli Friedman <eli.friedman@gmail.com> Fix for PR4140: Add the start of a Linux toolchain (basically, just
barely enough to get the given usage of -print-file-name working).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72412 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
b377b4b84ba839939124b68f50d6603206e3a995 23-May-2009 Daniel Dunbar <daniel@zuster.org> Fix use after free, found by Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72333 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
10708c4a89241a923522897dddaa42b8a67501aa 23-May-2009 Daniel Dunbar <daniel@zuster.org> Fix use after free, found by Benjamin Kramer.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72333 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
fefd5e89c5144fec7fdaff9c2c50f3237879261d 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
34e65770ad6142b033d6cec4f476ed20fb248bf3 22-May-2009 Fariborz Jahanian <fjahanian@apple.com> This patch adds support for sender-aware dispatch in Objective-C for the GNU runtime, when
compiled with -fobjc-sender-dependent-dispatch. This is used in AOP, COP, implementing object
planes, and a few other things.
Patch by David Chisnall.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72275 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d1cf46726227e8e32829109ff2aa3a8e00d7d5eb 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
- We could just warn about -fno-unit-at-a-time, but in practice people using it
probably aren't going to get what they want out of clang.

Also, use "clang" specified error for unsupported things instead of driver
unsupported error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72272 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e027a4b2399e9b0acfe0f77220c66bbe369067ee 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
- We could just warn about -fno-unit-at-a-time, but in practice people using it
probably aren't going to get what they want out of clang.

Also, use "clang" specified error for unsupported things instead of driver
unsupported error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72272 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
08303652626519a0d29a48a483803f0dd3f2383d 22-May-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Use llvm::Triple for storing target triples.
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72243 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
cb8ab23f7c800b041aeb6fc38c341d1aa0da86bf 22-May-2009 Daniel Dunbar <daniel@zuster.org> (llvm up) Use llvm::Triple for storing target triples.
- This commit has some messy stuff in it to extend string lifetimes, but that
will go away once we switch to using the enum'd Triple interfaces.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72243 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChain.cpp
oolChains.cpp
oolChains.h
0da440cb1e5a67795ffc6afad016afcb14855bf7 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't rely on getArchName() to return a constant string reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72241 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7cfe31a713d8fcfc2a1328e8fbd8efdeb0aec51b 22-May-2009 Daniel Dunbar <daniel@zuster.org> Don't rely on getArchName() to return a constant string reference.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72241 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f8d02dae5a4f12c8fd07ade677e111d8df089c68 22-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyzer-no-default-checks and --analyzer-output options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72238 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d8fc0f2e7751cf31cec5c2f3cc6a0b447e9debb3 22-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyzer-no-default-checks and --analyzer-output options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72238 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d98d887e5b8d58db5bf26444466d487f210ce25f 19-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fprintf-source-range-info from the Driver (this was renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f4e2486145b426e84175c8e34b0f200d74daa98b 19-May-2009 Daniel Dunbar <daniel@zuster.org> Remove -fprintf-source-range-info from the Driver (this was renamed)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
84266dbe34b417faafa26e6ea9d4c16ec8a0ec4b 18-May-2009 Daniel Dunbar <daniel@zuster.org> Reformat a comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72046 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
683ca381bf2b8dffab535c89d25250518bbec3a0 18-May-2009 Daniel Dunbar <daniel@zuster.org> Reformat a comment


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72046 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
162736b1d5e8bbb6aa8a2321a61aa5ce5e9eaf31 13-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Emit an unsupported error on -iframework.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71698 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
95a0da7b263777e6f97e5a08b6eb893681a234ba 13-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Emit an unsupported error on -iframework.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71698 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
106c79a6e35f5b8ea256506ea5b73244f6e483b9 06-May-2009 Daniel Dunbar <daniel@zuster.org> Tweak x86 -mcpu defaults.
- Default to yonah on Darwin (to get SSE3).

- Default to Pentium4 (32-bit) and x86-64 (64-bit) on
non-Darwin. Welcome to the 21st century.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71069 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
500aec477c82660adda912c35b634006017933be 06-May-2009 Daniel Dunbar <daniel@zuster.org> Tweak x86 -mcpu defaults.
- Default to yonah on Darwin (to get SSE3).

- Default to Pentium4 (32-bit) and x86-64 (64-bit) on
non-Darwin. Welcome to the 21st century.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71069 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
07181d709860d06026afa3b4ee5b6a65b48c9005 06-May-2009 Daniel Dunbar <daniel@zuster.org> Improve handling of (X86) target features.
- This is a WIP...

- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).

Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name

In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.

This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
868bd0aa9281929ef50d2e9a8c82a036906f53f5 06-May-2009 Daniel Dunbar <daniel@zuster.org> Improve handling of (X86) target features.
- This is a WIP...

- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).

Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name

In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.

This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71061 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6e3de3d0ca8b90214d1d8de2252516ff1a99c310 06-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyze-auto.
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71056 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
63be57a832b2dab70592d1d9b37a5cd9a627356e 06-May-2009 Daniel Dunbar <daniel@zuster.org> Add --analyze-auto.
- Currently just an alias for --analyze, eventually we want to refit
--analyze so that it is less automatic (i.e., does not force plist
output and does not hard code the list of checks).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71056 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5523e86616bc17c9092af47012c9df4b962788a7 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add -fobjc-tight-layout.
- This implements gcc style Objective-C interface layout (I
think). Currently it is always off, there is no functionality
change unless this is passed.

For the curious, the deal is that gcc lays out the fields of a
subclass as if they were part of the superclass. That is, the
subclass fields immediately follow the super class fields instead
of being padded to the alignment of the superclass structure.

- Currently gcc uses the tight layout in 32-bit and 64-bit modes, and
llvm-gcc uses it in 32-bit only, for reasons which aren't clear
yet. We probably want to switch to matching gcc, once this makes it
through testing... my hope is that we can also fix llvm-gcc in
order to maintain compatibility between the compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70827 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d6884a0b90091a063478ec7fa31f6d76c94e4917 04-May-2009 Daniel Dunbar <daniel@zuster.org> Add -fobjc-tight-layout.
- This implements gcc style Objective-C interface layout (I
think). Currently it is always off, there is no functionality
change unless this is passed.

For the curious, the deal is that gcc lays out the fields of a
subclass as if they were part of the superclass. That is, the
subclass fields immediately follow the super class fields instead
of being padded to the alignment of the superclass structure.

- Currently gcc uses the tight layout in 32-bit and 64-bit modes, and
llvm-gcc uses it in 32-bit only, for reasons which aren't clear
yet. We probably want to switch to matching gcc, once this makes it
through testing... my hope is that we can also fix llvm-gcc in
order to maintain compatibility between the compilers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70827 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ed6aa4c1401e56c36d9386fd658c9935132eeafc 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: When using the generic gcc tool, pass -m32 or -m64 if we
recognize the architecture.
- This is an attempt to force gcc to the write target.

- PR4094.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70647 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6ecc7a993f939c5255c36c7c0d965fb9c1543f2a 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: When using the generic gcc tool, pass -m32 or -m64 if we
recognize the architecture.
- This is an attempt to force gcc to the write target.

- PR4094.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70647 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f7d893fe3bf25a7c7d2b6ab27371fc1a9b6540b7 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70641 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a8304f67291b0182fb64f3afc621615288dd1d31 02-May-2009 Daniel Dunbar <daniel@zuster.org> Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70641 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
46363f5fc56d60238e4ad73b83e3b987f9041ea7 02-May-2009 Daniel Dunbar <daniel@zuster.org> DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70635 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
11e1b40d759a643086f590f6ffbd9d68360bad46 02-May-2009 Daniel Dunbar <daniel@zuster.org> DragonFly ToolChain definition for driver.
- Patch by Alex Hornung!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70635 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
ools.cpp
ools.h
a4eb3e7ad4c72d6783145f023a2cdea9b9421a18 01-May-2009 Douglas Gregor <doug.gregor@gmail.com> Implement -fmessage-length=N, which word-wraps diagnostics to N columns.

Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:

decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
type can only take one argument
typeof(int)(a,5)<<a;

However, here is a case where we need the vertical separation (since
there is no horizontal separation):

message-length.c:10:46: warning: incompatible pointer types initializing 'void
(int, float, char, float)', expected 'int (*)(int, float, short,
float)'

int (*fp1)(int, float, short, float) = f;

This is part one of <rdar://problem/6711348>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70578 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
fffd93f38340d4d2ca7ee78a8c91c890b2ff3fa0 01-May-2009 Douglas Gregor <dgregor@apple.com> Implement -fmessage-length=N, which word-wraps diagnostics to N columns.

Also, put a line of whitespace between the diagnostic and the source
code/caret line when the start of the actual source code text lines up
(or nearly lines up) with the most recent line of the diagnostic. For
example, here it's okay for the last line of the diagnostic to be
(vertically) next to the source line, because there is horizontal
whitespace to separate them:

decl-expr-ambiguity.cpp:12:16: error: function-style cast to a builtin
type can only take one argument
typeof(int)(a,5)<<a;

However, here is a case where we need the vertical separation (since
there is no horizontal separation):

message-length.c:10:46: warning: incompatible pointer types initializing 'void
(int, float, char, float)', expected 'int (*)(int, float, short,
float)'

int (*fp1)(int, float, short, float) = f;

This is part one of <rdar://problem/6711348>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70578 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e4e1349c27f275547d3f4615cfdf5cfe5d480bc1 30-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Revert r70424. We don't need it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70432 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
866cdc374be9c6888c7675cbc860073860c9f7e1 30-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert r70424. We don't need it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70432 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
87c2c4a982ec65965592adc92853cb3e4c0d1dea 30-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add PCH version to the -v output

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70424 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ee24266bfee859067d47d1517179da125d057ede 30-Apr-2009 Douglas Gregor <dgregor@apple.com> Add PCH version to the -v output

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70424 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3078eb341d2fcf055a1f159a5c0ea6138177c147 29-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure to pass the same options to the static analyzer as the
compiler.
- Code generation options may still affect the language...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70393 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bc85be85779a47bae728bbe6a2cd2e3732b1333d 29-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make sure to pass the same options to the static analyzer as the
compiler.
- Code generation options may still affect the language...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70393 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
f93696d739292e9fd93a16c78d4081ddc70955bc 29-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Enable PCH by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70339 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
214e8722439ff6dff1ca86190372a7477212f3c7 29-Apr-2009 Douglas Gregor <dgregor@apple.com> Enable PCH by default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70339 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ec9f5fb0f617778b9fa43a2a4755bd27981f5615 28-Apr-2009 Daniel Dunbar <daniel@zuster.org> With -ccc-pch-is-pch, always treat precompiled inputs as PCH,
regardless of extension.
- Otherwise we can't expect that just plugging in -ccc-pch-is-pch
will work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70318 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ea71a5b388bc5bf91cb81ef004d0dd7f011af512 28-Apr-2009 Daniel Dunbar <daniel@zuster.org> With -ccc-pch-is-pch, always treat precompiled inputs as PCH,
regardless of extension.
- Otherwise we can't expect that just plugging in -ccc-pch-is-pch
will work.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70318 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b706474bce78d4c9349eca8699401495f3425fe9 28-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Add a header containing the Clang version; make the driver use this
Clang version value rather than hard-coding "1.0".

Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70264 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ab41e63821dc60ad144d0684df8d79a9eef86b75 28-Apr-2009 Douglas Gregor <dgregor@apple.com> Add a header containing the Clang version; make the driver use this
Clang version value rather than hard-coding "1.0".

Add PCH and Clang version information into the PCH file. Reject PCH
files with the wrong version information.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70264 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
baf2caa47b16e32d7728db2886c8b70dc999585c 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Turn PCH off by default, yet again. I'm happier about it this time, though

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70168 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
fc68bca8a4351ed36593fcc97a260696719e0ed4 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Turn PCH off by default, yet again. I'm happier about it this time, though

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70168 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1d1fbc6c0fb471a37988f912a4d9d7b011285d2f 27-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Trying turning on PCH by default yet again. We might actually a chance at success now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70164 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f527ce460311769e16dfc260f021b6b9032910fb 27-Apr-2009 Douglas Gregor <dgregor@apple.com> Trying turning on PCH by default yet again. We might actually a chance at success now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70164 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a6ce4fadbc231b415654d1ae3a494b4959ce02ae 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Turn off PCH by default, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70113 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e60ee1d46aac435154682f4ebba724f24d4b0184 26-Apr-2009 Douglas Gregor <dgregor@apple.com> Turn off PCH by default, again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70113 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c49e58e32632a461655bcaeab4c80a83877f92fa 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> One more crazy try with PCH-by-default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70112 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
48cac20a16c6a4e93ec1fc29a37da37e24d637a9 26-Apr-2009 Douglas Gregor <dgregor@apple.com> One more crazy try with PCH-by-default

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70112 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
264af3f18adc54169733d4b2c1ca5ecc687cbdfe 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Turn of PCH by default. I got the info I was looking for

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
79db6a2541d90f1fff8dafbd9fdbecf87e846584 26-Apr-2009 Douglas Gregor <dgregor@apple.com> Turn of PCH by default. I got the info I was looking for

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0dbf5ce733d057ce23c805c4cbd9c97be8033770 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -std-default= option.
- This can be used to supply a default value for -std=; the idea is
that this can be used in conjunction with CCC_ADD_ARGS or
QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
modify the build system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70102 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a3ff202ee4fb21728e930d5d029ba4925129912c 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -std-default= option.
- This can be used to supply a default value for -std=; the idea is
that this can be used in conjunction with CCC_ADD_ARGS or
QA_OVERRIDE_GCC3_OPTIONS to change the default without having to
modify the build system.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70102 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2e6c74cbe908e8055014845a2ff33cf2798fac60 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
4df9a664b7a0bfbd065253349cc5ead88b50b9a2 26-Apr-2009 Daniel Dunbar <daniel@zuster.org> Add option for AddAllArgsTranslated to control whether output argument
should be joined or separate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70101 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
98f66ad19b30dc30c099057da4ecf74c48e9f774 26-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Another shot at switching PCH on by default, now that we've cleaned up some bugs and improved performance. Will be reverted after Mr. Speedy gets done with it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70099 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cf11b52ac2819e0d82d60ba570b14ffdba3cd607 26-Apr-2009 Douglas Gregor <dgregor@apple.com> Another shot at switching PCH on by default, now that we've cleaned up some bugs and improved performance. Will be reverted after Mr. Speedy gets done with it

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70099 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
41f5e351a6629b486a66c6cd38c4a66da8dd6a20 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Revert my PCH change. I'm happy now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70018 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7b3b24ecdf0e41eb6b734e4dd268d0af10874ad0 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Revert my PCH change. I'm happy now

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70018 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
95812c25e100ed982b012b58f73c7d6a42d38559 25-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Temporarily try to build with PCH by default. Revert this change once
we see what trouble it causes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70017 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c58fe35cedbd64f3c8f55405cd32131c866b035d 25-Apr-2009 Douglas Gregor <dgregor@apple.com> Temporarily try to build with PCH by default. Revert this change once
we see what trouble it causes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70017 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
de30fce1f7f9553ac2fdb2844e1299f530fbea2e 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: -mkernel disables default use of unwind tables (although I
don't yet understand where this is happening in llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9c7db4a209b74f1ca88b6670258749bf90af86dc 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: -mkernel disables default use of unwind tables (although I
don't yet understand where this is happening in llvm-gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
951628b969f7e6e35d6a3c08bf01561a547ec41e 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: -mkernel and -fapple-kext imply -mno-red-zone.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70010 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8abf881c8fbe33a6470f06f90d4dc7159cabced3 25-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: -mkernel and -fapple-kext imply -mno-red-zone.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70010 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
19f5b1a443fbbae96859e4b89527e447ff1f7606 24-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't run dsymutil when making a fat executable direct source.
- Otherwise, we will end up with stray .dSYM files which don't get
lipo'ed or removed.

- Ideally we would run dsymutil on the result, but we don't have the
infrastructure for that yet. Note that gcc doesn't handle this case
either.

- <rdar://problem/6809621> [driver] clang leaves .dSYM files lying
around in tmp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69951 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3ed294522653323e4867a2eba03acc98a99e5479 24-Apr-2009 Daniel Dunbar <daniel@zuster.org> Don't run dsymutil when making a fat executable direct source.
- Otherwise, we will end up with stray .dSYM files which don't get
lipo'ed or removed.

- Ideally we would run dsymutil on the result, but we don't have the
infrastructure for that yet. Note that gcc doesn't handle this case
either.

- <rdar://problem/6809621> [driver] clang leaves .dSYM files lying
around in tmp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69951 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
64524d20d8c96c9e72abced5f536fc49a403203e 24-Apr-2009 Daniel Dunbar <daniel@zuster.org> Call ld, not collect2.
- <rdar://problem/6517382> [driver] call ld directly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69938 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
99612939d02d99a6ef3ff037aa14c4277e9c43ce 24-Apr-2009 Daniel Dunbar <daniel@zuster.org> Call ld, not collect2.
- <rdar://problem/6517382> [driver] call ld directly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69938 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
13bac9ed8736c3d07fd47bf6fb78c62681995c58 21-Apr-2009 Chris Lattner <sabre@nondot.org> rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69662 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
182e09240a33c6f1d303deecabec6e0e9c9d109d 21-Apr-2009 Chris Lattner <sabre@nondot.org> rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69662 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a77aa007b6a6d6d6dd781450391c1863b7dc1533 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Look at the TMP environment variable as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69638 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3ca7ee9a40532167f67bde17fff5e678f183f3f2 21-Apr-2009 Daniel Dunbar <daniel@zuster.org> Look at the TMP environment variable as well.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69638 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
02e396a0794eb08175f35ed08ef4e7b0e0c18be2 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Also look at the TEMP environment variable as a place to put temporary
files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69622 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b03417fdc42ae19d2deb2ee1e5d2c3e9896a2a04 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> Also look at the TEMP environment variable as a place to put temporary
files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69622 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
121f2516ae9aabe2cb03975963fa56621aadc507 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> If defined, use TMPDIR environment variable as location for temporary files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69609 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
f60c63af0ed33ab890600ee6146e7685901f46df 20-Apr-2009 Daniel Dunbar <daniel@zuster.org> If defined, use TMPDIR environment variable as location for temporary files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69609 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ca63e1c0301e1abeabf77b9ae36f429e7072b764 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward f[no-]dollars-in-identifiers to clang, when specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7695fba30221613b7cf31276456217c41bb90960 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward f[no-]dollars-in-identifiers to clang, when specified.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
4bd8a7ff789dbaf423fb1bd7e9754495344bdc04 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward -fno-diagnostics-fixit-info to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
49138fc59eeac2aacd3b7e04c2642180d5baefd7 19-Apr-2009 Daniel Dunbar <daniel@zuster.org> Forward -fno-diagnostics-fixit-info to clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
95734503e030e934c4e082ee2ff44d7106bb8c7b 18-Apr-2009 Douglas Gregor <doug.gregor@gmail.com> Preliminary PCH support in the driver

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69410 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
df91ef3d6c55692a0236f67b6c6b134a3bf84098 18-Apr-2009 Douglas Gregor <dgregor@apple.com> Preliminary PCH support in the driver

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69410 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
2ccf617abead15547573f284d4841cf1f3bd2f92 17-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Added -print-ivar-layout option. No change in functionality
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
448f5e6c191b40c90a67c48547df420d16f48b96 17-Apr-2009 Fariborz Jahanian <fjahanian@apple.com> Added -print-ivar-layout option. No change in functionality
yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5a34ca83e71cff5dd578bf1be84385cfdb4b8806 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow using clang as a precompiler, even if it is an
unsupported arch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69322 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
fec26bd1f4681db8c253fb86529e52bcad28a3ff 17-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow using clang as a precompiler, even if it is an
unsupported arch.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69322 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
77c7d34ab7344a7cb55595cdbc38bc9febe6b11f 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Pass -fdiagnostics-show-option to clang-cc by default.
- <rdar://problem/6796848> implement -fdiagnostics-show-option


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69276 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9e820ee054fefe5422b4db3f681e567a8976747e 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Pass -fdiagnostics-show-option to clang-cc by default.
- <rdar://problem/6796848> implement -fdiagnostics-show-option


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69276 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0e9eeea74fa74cc4120dfaa1c7f588a9c99de64a 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69261 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
06ef3c3e9be4923b8e29c8e267b0c56afaa14ff3 16-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69261 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a5f09bc964bf16c4ae0ca6587d662b061062b3a2 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add --help-hidden


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c35d71f1e0a0c72fd43a73ddecd408bf43d501de 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add --help-hidden


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c742c4a1289937a08a722cd700824c14acd40e74 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/6790309> ER: Support
-fsigned-bitfields/-funsigned-bitfields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
70d3c92820f590b10553da9c96eda24e4325ba34 15-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/6790309> ER: Support
-fsigned-bitfields/-funsigned-bitfields


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
346d9e455304edb2eb9f076b322dd26d619b7849 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68884 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d82df3ad430397d7f9ef511e7c5157f997c41f53 12-Apr-2009 Chris Lattner <sabre@nondot.org> Implement support for GCC's -dD mode, which dumps -E output *and*
macro definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68884 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9b59d84c5d55a30b4b87f42d1de63d1c4b77037e 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Honor MACOSX_DEPLOYMENT_TARGET environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68822 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f36a06a9584cf351e1bb7c5ebf2f707ed416daba 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Honor MACOSX_DEPLOYMENT_TARGET environment variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68822 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
193de1ca58431ad2186ce46fbdf7a41d953ad815 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -miphoneos-version-min to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68816 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ff8857a9e6f533765f63b2934902645baa7ddd09 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -miphoneos-version-min to clang.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68816 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
75e76d756d6f9634000489971fe1f06d2be53698 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: CCC_ADD_ARGS could end up using dangling pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68805 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a1e2fd9b580ae583b91d3288d59c00ca9f6a56b8 10-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: CCC_ADD_ARGS could end up using dangling pointers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68805 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
064e0f2b3e89608332e97ad2ce6e82e79545a7e4 09-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split out CPP specific options for clang so that we don't end
up adding them twice when running with -no-integrated-cpp or
-save-temps.
- <rdar://problem/6766636> -save-temps falls over with prefix headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68660 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
c21c485b4fb58ef5d55cf3e523263dd824a2ace4 09-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Split out CPP specific options for clang so that we don't end
up adding them twice when running with -no-integrated-cpp or
-save-temps.
- <rdar://problem/6766636> -save-temps falls over with prefix headers


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68660 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
cdd3c76f2e9e6897c185b35559e68cc2bf6506ae 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).

- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

- Set __NO_INLINE__ following GCC 4.2.

- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

- Set __EXCEPTIONS for Objective-C NonFragile ABI.

- Set __STRICT_ANSI__ for standard conforming modes.

- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3bbc75302fd43cf13d868b46c94ff8794b302e43 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> More fixes to builtin preprocessor defines.
- Add -static-define option driver can use when __STATIC__ should be
defined (instead of __DYNAMIC__).

- Don't set __OPTIMIZE_SIZE__ on Os, __OPTIMIZE_SIZE__ is tied to Oz.

- Set __NO_INLINE__ following GCC 4.2.

- Set __GNU_GNU_INLINE__ or __GNU_STDC_INLINE__ following GCC 4.2.

- Set __EXCEPTIONS for Objective-C NonFragile ABI.

- Set __STRICT_ANSI__ for standard conforming modes.

- I added a clang style test case in utils for this, but its not
particularly portable and I don't think it belongs in the test
suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68621 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0546e9d4d0185181ca833ad7286b45bff6462728 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Darwin ld: Unconditionally add -lstdc++ if we are pretending to be
g++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68601 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
edfa02b85b186e9ea9e0c841539a77ed32ee9148 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Darwin ld: Unconditionally add -lstdc++ if we are pretending to be
g++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68601 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dedc94c29b4dd7cec9aa290170f7bb1062a2a9b1 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c9abc043af88f90d177a5bd147f627b78ca49fde 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Make debug info work when using -save-temps.
- This is pretty ugly, but the most obvious solution. Chime in if you
have a nicer one.

- The problem is that with -save-temps, clang-cc has no idea what the
name of the original input file is. However, the user expects to be
able to set breakpoints based on the input file name.

- We support this by providing a new option -main-file-name (similar
to -dumpbase used by gcc) which allows the driver to pass in the
original file name.

- <rdar://problem/6753383> building with clang using --save-temps
gets the compile unit name from the .i file...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68595 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e079c717362b860dbad093253e55255ce76321f6 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.

- Added __pic__

- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9fd0b1f845a61e71dd8099f596532d34c519630a 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Set __PIC__ (more) correctly.
- Add -pic-level clang-cc option to specify the value for the define,
updated driver to pass this.

- Added __pic__

- Added OBJC_ZEROCOST_EXCEPTIONS define while I was here (to match gcc).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68584 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1fbe7ce3b0e21cca92dc429126750e3bdd63d7c1 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fpascal-strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68570 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
82d00688525c876bf47bce414dedae9c343e67f5 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -fpascal-strings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68570 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
facf35142ae964c78b827313c19583e0fb2f9f02 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -{std,ansi,trigraphs} when there are
multiple instances of an option.

Also, removed direct -ansi support from clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68558 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d573d26e1abcce24c31ece3d6f7af158db569e4c 08-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix forwarding of -{std,ansi,trigraphs} when there are
multiple instances of an option.

Also, removed direct -ansi support from clang-cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68558 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7ad5e312a1f68ead5df0ecefb5cf7811e19a546d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward remaining -f options to clang manually.
- Groups are really just intended to hold inherent structure of the
options, not be abused for individual tool argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68554 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
3aaf082689d3235937a2e56a60f90fc1b3aebfb2 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward remaining -f options to clang manually.
- Groups are really just intended to hold inherent structure of the
options, not be abused for individual tool argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68554 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c7e14460094afb16b2110d132f2140c2d0e4e3be 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Only forward last instance of -mmacosx-version-min= and
-isysroot to clang.
- Don't forward arbitrary -i* options to clang, just the ones we know
about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68553 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2ac9fc2ad64e16127df8c60caeea2edfe9a400a2 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Only forward last instance of -mmacosx-version-min= and
-isysroot to clang.
- Don't forward arbitrary -i* options to clang, just the ones we know
about.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68553 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9d805ce49ec3f5061b9c6944f9da1693cf701cca 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Manually translate a number of -f with no- variants options to
clang.
- We will eventually want some more driver infrastructre for this
probably.

- For now, the clang-cc interface stays relatively the same, but we
don't accept multiple instances anymore, or the [no-] variants
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
48d1ef782c8c88066b5febf60f8f456064d7d3f0 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Manually translate a number of -f with no- variants options to
clang.
- We will eventually want some more driver infrastructre for this
probably.

- For now, the clang-cc interface stays relatively the same, but we
don't accept multiple instances anymore, or the [no-] variants
directly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68550 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9e5c3953213d392c7892480202dd8625a915a711 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default for ArgList::hasFlag and simplify implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
9af6668984f1594459a58c381d95272aa7ca7663 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add default for ArgList::hasFlag and simplify implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68549 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
31abb2b2bc7607fe83fb161fcf382bb54cab2def 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly warn that -pg isn't supported (even though we
aren't failing the compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68540 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5c1aaafbd6dd25a99ca1960e1c3c98aeefe9d728 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly warn that -pg isn't supported (even though we
aren't failing the compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68540 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1cfd891cf792c46f2b740a074ec2ba716ead3cd8 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
ption.cpp
1e23f5f963dd6a3cee43ace77578161798e41e2d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add 'q' flag for options which shouldn't be reported as unused.
- <rdar://problem/6756295> warning about '-dynamic' argument unused
during compilation seems incorrect


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68535 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ptTable.cpp
ption.cpp
1876be21baa3eb63173ae908ab12315970a6602a 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a parsing bug where some options were matched
incorrectly. I'm blanking on the smartest way to write this search,
but we should just do the right thing when we move to TableGen.
- <rdar://problem/6761194> [driver] -Wextra-tokens isn't parsed
correctly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68525 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
4ae24e7f118f500994772cb051be2e3343b68c1d 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a parsing bug where some options were matched
incorrectly. I'm blanking on the smartest way to write this search,
but we should just do the right thing when we move to TableGen.
- <rdar://problem/6761194> [driver] -Wextra-tokens isn't parsed
correctly


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68525 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
676c28bb915a6c7f09c12b58c2be65ea47156f0c 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: More verbosity reduction.
- Ignore some more -W options and -[fm] options which we can somewhat
safely ignore.

- Recognize that -W is an alias for -Wextra

W: -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wfour-char-constants -Winit-self -Wmissing-format-attribute -Wno-#warnings -Wno-comment -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wstrict-prototypes -Wunused-parameter

f: -fconstant-cfstrings -fdollars-in-identifiers -finline -finline-functions -fno-inline -fno-keep-inline-functions -fno-strict-aliasing -fobjc-atdefs -fobjc-call-cxx-cdtors -fobjc-new-property -fstack-protector

m: -mconstant-cfstrings -mfix-and-continue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
16fd3a9f5159b74bfdd65cf290b4bd091088de91 07-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: More verbosity reduction.
- Ignore some more -W options and -[fm] options which we can somewhat
safely ignore.

- Recognize that -W is an alias for -Wextra

W: -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wfour-char-constants -Winit-self -Wmissing-format-attribute -Wno-#warnings -Wno-comment -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wstrict-prototypes -Wunused-parameter

f: -fconstant-cfstrings -fdollars-in-identifiers -finline -finline-functions -fno-inline -fno-keep-inline-functions -fno-strict-aliasing -fobjc-atdefs -fobjc-call-cxx-cdtors -fobjc-new-property -fstack-protector

m: -mconstant-cfstrings -mfix-and-continue


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68487 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9a553c4c52b949a7b662e781196bb587462c6ea7 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -dumpversion, this is used by some configuration
scripts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e06dc219a869d73b6c9a398a2dee0aa2d4e2dcf0 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -dumpversion, this is used by some configuration
scripts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68418 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
aaac8f02d72e54c6744121e810ea806cde1f766b 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle properly calling dsymutil when source input is
preceeded by a linker input flag.
- <rdar://problem/6757236> clang should make a dSYM when going
straight from source to binary

- This still matches gcc, but the right way to solve this would be to
detect the situation we care about (we are compiling from source
and linking in one step), instead of looking at the suffix of the
input file. The Tool doesn't quite have enough information to do
this yet, however.

- Also, find the suffix correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68417 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0b46e1b5389615a8d6641f4d7bf5415d29acfef3 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle properly calling dsymutil when source input is
preceeded by a linker input flag.
- <rdar://problem/6757236> clang should make a dSYM when going
straight from source to binary

- This still matches gcc, but the right way to solve this would be to
detect the situation we care about (we are compiling from source
and linking in one step), instead of looking at the suffix of the
input file. The Tool doesn't quite have enough information to do
this yet, however.

- Also, find the suffix correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68417 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
6c6e3f7ea82d0266aeea20026040964b712d9cd9 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Automatically suppress warnings for duplicate versions of
flags which were used for something.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68416 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4f53b298846d720fbb906373f3f28d92f2121f35 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Automatically suppress warnings for duplicate versions of
flags which were used for something.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68416 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
025de204498d19c7d684769858d86b97667c918b 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68410 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
bf4a6767a8fd4f81df93c55f88b1b4b7142a04d4 04-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -Qunused-arguments option to suppress driver "unused
arguments" warning.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68410 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
eb4efed0be2f096eb7f2d8a3680d3dff9a278dc7 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
68fb469aeb19144403e703b825854d08353c8eea 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Explicitly ignore -fpch-preprocess when using clang, we don't
need to do anything special to support this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68403 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ools.cpp
d7baa60984758d1e6001279b192eabe6bba76860 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add missed translation for darwin::Preprocess (gcc), -d*
wasn't being forwarded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68365 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8a2073a85670a13b0bcc1726bc7f80d458f8245b 03-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add missed translation for darwin::Preprocess (gcc), -d*
wasn't being forwarded.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68365 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0fea0859500a0bd1a433c8cd6ddcc1ccc55d3f88 02-Apr-2009 Ed Schouten <ed@80386.nl> Add some whitespace to test my commit privileges.

Approved by: ddunbar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68343 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
c66a5a30a27e7b9cfab46ac8be918e3ea5b0c5a5 02-Apr-2009 Ed Schouten <ed@80386.nl> Add some whitespace to test my commit privileges.

Approved by: ddunbar


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68343 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
2ff26852b6f61aa509774bd605f7f039b6aa24b5 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak search paths for FreeBSD.
- Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68332 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
bc534664d008bc98d5ce76c053921bf5ee21fc65 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak search paths for FreeBSD.
- Patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68332 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
3b7c84c3488384af55a9984f0cd71aeccc5b90bd 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Wire --version to normal -v version text.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68316 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6cc73de6ebb3eb00af7dd5149f6778318f1fb76f 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Wire --version to normal -v version text.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68316 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
126da5e5a1461d63cd60121c0c25704fb546f672 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow -ccc-gcc-name to specify the name/path to use when
calling gcc in generic configurations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68260 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
78d8a089c8f124ba6f47bb37e2c4a36986f60e23 02-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Allow -ccc-gcc-name to specify the name/path to use when
calling gcc in generic configurations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68260 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b7daa2d64793ff47188f7a63a9b4bb53802b7271 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Quick and dirty (!) fix to make sure we use powerpc in triples.
- PR3922

- I have a clean solution for this in flight, but it may take a while
to come to fruition so we'll take a quick fix for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68241 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
ools.cpp
bf54a06f9b771c2a2730cc63eb89bce0522515b5 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Quick and dirty (!) fix to make sure we use powerpc in triples.
- PR3922

- I have a clean solution for this in flight, but it may take a while
to come to fruition so we'll take a quick fix for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68241 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
ools.cpp
790528ece7e7134f305a26fda954fe683d42cd8f 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add freebsd::Link
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68233 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
008f54a54299eaafdaa940e2bdeaf55935ecd95a 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add freebsd::Link
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68233 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
8a17040dda5d1da2faa91b167edd3595cfd25133 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME, use -emit-pth to drive PTH generation.
- c.f. r68164


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68184 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bb71b392729b86858ee861b967006a03c07c41f2 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Remove a FIXME, use -emit-pth to drive PTH generation.
- c.f. r68164


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68184 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
7f518b1f802e6e8451f2b4dec9c4764153b0d082 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68182 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8a8d8afa3df40e9f122d2b826f1a825a66f6908d 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak/cleanup darwin::Link a bit, add several FIXMES, and improve test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68182 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
08a3b752c89416919c691ba732475b0c62acd9bb 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Assemble and add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68165 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8e4fea6750dbac032c172f3279c63b7815b7423e 01-Apr-2009 Daniel Dunbar <daniel@zuster.org> Tweak darwin::Assemble and add a FIXME.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68165 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e627b6808b4f973c64a8b3b5612e8b609a0d1bff 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement basic --help text.
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68148 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
91e28afe3503893c69afd71877f11e3bf03fa4ce 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement basic --help text.
- PR3875.
- <rdar://problem/6615249> [driver] ccc should support some form of
--help


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68148 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9ea3322dcf04fe44bdd6f0d328cd4648660986c7 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::getOptionKind.

Also, removed default value for getOptionMetaVar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
febdf7d3858539a3533895bdeb3bd5c083fb087a 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::getOptionKind.

Also, removed default value for getOptionMetaVar.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68146 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
bd563228879f01986f459e2a860285039dc59897 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -Wp, and -Xpreprocessor arguments to clang when using
the preprocessor.
- PR3602.

- As is inherent in the blanket forwarding options, this will only
work if clang-cc happens to accept what the user passed. Users by
and large should use driver options to interact with the
preprocessor, if at all possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68144 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
077ba6a3ac3628afb0d3c460e81ce013bccbdbed 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -Wp, and -Xpreprocessor arguments to clang when using
the preprocessor.
- PR3602.

- As is inherent in the blanket forwarding options, this will only
work if clang-cc happens to accept what the user passed. Users by
and large should use driver options to interact with the
preprocessor, if at all possible.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68144 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
636cccdd9342180597906f56e44179502aec2ef2 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add extra parameters for help text to option definitions.
- Currently unused.

And yes, now may be about the time I want a TableGen backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
c0d12e93ee244534147960334c095a6d6510d0ae 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add extra parameters for help text to option definitions.
- Currently unused.

And yes, now may be about the time I want a TableGen backend.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68139 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
133a0819cbec35a0bd9af0156068875647fe7b38 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Call 'as' directly on FreeBSD.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68121 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
68a31d406c6dc4382c700d1199b062de2aa7e1da 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Call 'as' directly on FreeBSD.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68121 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
7fe2af6f3bc1c5e12c68ed4ea8836ba280fb70d0 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> (LLVM up) Update to use llvm::sys::getHostTriple().
- Always pass -triple to clang-cc (-arch will be removed).

- clang-cc doesn't play guess work with the target triple anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68119 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
af07f936b698575f2c91f1c1134c116f1ef0dedd 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> (LLVM up) Update to use llvm::sys::getHostTriple().
- Always pass -triple to clang-cc (-arch will be removed).

- clang-cc doesn't play guess work with the target triple anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68119 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e9b52a2500978bb3dc3c9f3df6e85c11c2d4515a 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68069 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
b85f59de0e1ec3c9270c720a350beffa7b1ae14a 31-Mar-2009 Daniel Dunbar <daniel@zuster.org> Comment fix.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68069 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
606f6146e65b52cf4ed6144427b2974f81c153bd 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch FreeBSD tool chain.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68061 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
75358d267256022475371416654b056ad8531cb3 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch FreeBSD tool chain.
- Patch by Ed Schouten!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68061 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
722ee4edda4e75faa4451a738f481ba365b896da 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Unbreak ArgList::hasFlag.
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68044 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
776dbd8b0e4414e5002ffe6e8bd9a7e79879521d 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Unbreak ArgList::hasFlag.
- <rdar://problem/6726511> [driver] clang does not have -msoft-float
hooked up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68044 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
003359853b1afaeaa65afe81bc4abe5d1c0edf09 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix -MD with no -MT when -o is specified (and fix test case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68042 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
46562b9122417bf6f70626f69bd79b8f5a4adac9 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix -MD with no -MT when -o is specified (and fix test case).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68042 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
049b7243e866b45eb3ad2f5dc78cf6662a86b6f7 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68027 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
cd8e4c44dd068956e9181381be3ee2d49a0fac52 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -M and -MM.
- Not particularly elegant, but my hand is forced by gcc.

Also, tweak -ccc-print-bindings output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68027 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
0bf13ebbf437f7e494c4e5e92fbcbb867fd14481 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Improve dependency file support.
- Rip out various bits of logic from clang-cc's dependency file gen,
force driver to provide instead.

- -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name

- -M and -MM still don't work correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68022 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
a5a7bd0de7b6b80212095195a055a4a43f21d4b2 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Improve dependency file support.
- Rip out various bits of logic from clang-cc's dependency file gen,
force driver to provide instead.

- -MD output now goes to proper location
<rdar://problem/6723948> clang -MD puts dep file in /tmp with wrong name

- -M and -MM still don't work correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68022 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
ae849528416c7ba91e7e6657f2647dbe95496902 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
oolChains.cpp
478edc295efc560627053e2320bedd2f696ae028 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Track which original arguments an arg is derived from, so that
we can properly claim arguments, even if they have been translated by
the tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68020 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
rgList.cpp
oolChains.cpp
259cc38782e0f61be1acdab1abd139b7b2d47bd4 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test case for darwin::Preprocess and darwin::Compile
tools, and enable them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68019 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
9120f179fd2e354f067e4ef2c76dcf3fc4db8a16 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test case for darwin::Preprocess and darwin::Compile
tools, and enable them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68019 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
1e6f9ffbba756208e3006f3f215bdb5ef492ef5f 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make sure to claim -### before emitting "unused argument"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68018 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a2094e76fc545b9e17c851c3d2c46b719c5f17eb 30-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make sure to claim -### before emitting "unused argument"
warnings.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68018 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
62e9c6413db1280587b5c62ded791f5754d8d3fd 29-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Finish porting Darwin::Preprocess and Compile port (still
unused, and lacking a test case).
- ccc is now on death row, pending some more testing and bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
a3ec60e0cf2a1916f479288998d31bd980b1a306 29-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Finish porting Darwin::Preprocess and Compile port (still
unused, and lacking a test case).
- ccc is now on death row, pending some more testing and bug fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68012 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
06f9792b3f66164e5db08c4ba5bcbf145933c16e 29-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start porting Darwin::Preprocess and Compile implementations
(currently unused).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68003 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
40f1265ebd42ece3e7f7917319b56012e8e2bce2 29-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start porting Darwin::Preprocess and Compile implementations
(currently unused).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68003 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
360079aeca1e925e3e7861dc53d3614a5f326934 27-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
- This still has issue that derived arguments don't propogate "used"
information correctly so spurious "argument unused" warnings will
still show up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67841 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b9f3a777e503851964c9542a0261e45eece59747 27-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass -f[no-]pascal-strings on to clang, even if it has been
turned into -m[no-]pascal-strings by the tool chain.
- This still has issue that derived arguments don't propogate "used"
information correctly so spurious "argument unused" warnings will
still show up.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67841 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ef68dd39e90fb6ca558e765d77975b4d4f30ce07 27-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: -print-libgcc-file-name was searching wrong path list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67837 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
08c65e068993573882243f469caa6be5e8597d2a 27-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: -print-libgcc-file-name was searching wrong path list.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67837 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
32b1bbe0a8fc63b3fcde326eeb5b6ea2ac74af77 27-Mar-2009 Mike Stump <mrs@apple.com> Fix searching for gcc, we only want executable files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67806 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
950bedd8a9f00caabd2f1fc6812d70e08103f847 27-Mar-2009 Mike Stump <mrs@apple.com> Fix searching for gcc, we only want executable files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67806 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
be3093b90d8c50c3858b381977de38e9c8121c2d 26-Mar-2009 Mike Stump <mrs@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67769 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
a44ae133296620ee9a7d290253bcb076f03fe3e5 26-Mar-2009 Mike Stump <mrs@apple.com> Remove dead code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67769 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
eb1be3fea0e2f41f3bc6a708a8c38b00c0888739 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation
in new driver


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67760 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
02633b541b04ad5ffc1c70f4c2feeeb13e607057 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Link tool.
- <rdar://problem/6717381> [driver] implement ld argument translation
in new driver


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67760 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ools.cpp
ools.h
55e34e3bf9f92e3fc23bfa0ac7fbe382dc7b2710 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67757 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d7b88c2cb8986217f164203747d35c8f596e38c2 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix a number of option definition mismatches (flags instead of
separate, or vice versa).

Also, fix initialization of LinkingOutput variable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67757 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0ded7ded3be29d0c36e652da31e6bf1d9ea994b5 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print the correct target when printing the version.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67756 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
70c8db1003af49d3627aeef41fcdd7c6c6a7df79 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print the correct target when printing the version.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67756 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9cdd4d47dbc12191aa8b2f700b3438613fb4b7ff 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67754 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
d73fe9b70c5f6738d004744562287a62831f39bf 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move GetReleaseVersion to static Driver::GetReleaseVersion method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67754 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
7d3f8852b069805fbdc02e1d782a5c088191e7c0 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67753 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
524b9fb54564ab8bc437118ed55ee7c9e8c1247d 26-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::AddAllArgsTranslated; for forwarding options to
tools with the name of the option replace, and arguments rendered
separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67753 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
c272d26ce04f6cb89be293c81246f05e7e41025c 26-Mar-2009 Chris Lattner <sabre@nondot.org> hopefully fix VC++ build error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67741 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
92b369928b8e9ad156fb6eec2bf9f21d657bd69b 26-Mar-2009 Chris Lattner <sabre@nondot.org> hopefully fix VC++ build error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67741 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9e7114819b1b4cc124e8f1c50908e734c6c5c3c9 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement Darwin_X86 tool chain level argument translation.
- This is really gross, but its the easiest way to match gcc. Once we
are confident in the driver, we can try and push these translations
down into tools.

- No test cases for this yet, it's hard to see the effects of these
translations before the gcc tool argument translation is pulled
over.

- Interaction with "unused argument" warning hasn't been worked out
yet.

- <rdar://problem/6717359> [driver] implement toolchain specific
argument translation.

"It's horrible in here."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67683 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
ec069ed8a6647d84cc3a58d46d5b2a3c9f000704 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement Darwin_X86 tool chain level argument translation.
- This is really gross, but its the easiest way to match gcc. Once we
are confident in the driver, we can try and push these translations
down into tools.

- No test cases for this yet, it's hard to see the effects of these
translations before the gcc tool argument translation is pulled
over.

- Interaction with "unused argument" warning hasn't been worked out
yet.

- <rdar://problem/6717359> [driver] implement toolchain specific
argument translation.

"It's horrible in here."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67683 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
0752a102f3abe787f38772c8a7269bfb909692f5 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67680 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
4e7e9cff2e3b1bf15da06a4284a936da15e19578 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -Xarch_, including warning for nasty -Xarch_ use cases
we aren't going to support. For example:
clang -Xarch_i386 -S -Xarch_i386 -o -Xarch_i386 myi386asm.s ...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67680 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
f2f1f9de712de6ec5ee5d49f56973e97f7ab5c8e 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
f6dd66b7b80e2fb42628df2593b3948149a53a5f 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Replace Option::ForwardToGCC by Option::DriverOption (which
matches the flag in Options.def).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67679 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
eb6879861257e5c2894a0facefc0df48178350c3 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix typo in JoinedAndSeparateArg::render.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67677 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ea728acde83cfaee282ab239fa2c22dccca819a0 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix typo in JoinedAndSeparateArg::render.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67677 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
a16e4fe637c9098d7aa334262b8394c1a8afd857 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.

- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.

- No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
oolChains.h
f3cad36e59a41b5767fe662b5ac8911ee174b801 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Prep for tool chain specific argument translation.
- Lift ArgList to a base class for InputArgList and DerivedArgList.

- This is not a great decomposition, but it does embed the
translation into the type system, and keep things efficient for
tool chains that don't want to do any translation.

- No intended functionality change.

Eventually I hope to get rid of tool chain specific translation and
have each tool do the right thing, but for now this is the easiest way
to match gcc precisely (which is good for testing).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67676 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ompilation.cpp
river.cpp
ptTable.cpp
ption.cpp
oolChains.cpp
oolChains.h
8eeefeb566c135b6b40243c325aa0e99883cf7d1 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> gcc 4.3 finds my use of ^ suspicious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67673 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
cf51ece8f1dc5e34338c03c1fdf7c105ebdbf7f5 25-Mar-2009 Daniel Dunbar <daniel@zuster.org> gcc 4.3 finds my use of ^ suspicious.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67673 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
064d07056bc41edfed01d0c82204d7e37189ecae 25-Mar-2009 Ted Kremenek <kremenek@apple.com> Turn on -analyzer-eagerly-assume by default when using 'clang-cc' to perform
static analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67665 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
9b646dac1c05fbfbfb4db0cb88ea28e74fbe7b9a 25-Mar-2009 Ted Kremenek <kremenek@apple.com> Turn on -analyzer-eagerly-assume by default when using 'clang-cc' to perform
static analysis.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67665 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
dec1445fa095364e7c94bfe7bb8f4ad1dbfc17a1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
- -emit-llvm no longer changes what compilation steps are done.

- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.

- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67645 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
337a6271b98c4c183f7eaad1563a75260b4f2871 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle -flto, -O4, and tweak -emit-llvm to match llvm-gcc.
- -emit-llvm no longer changes what compilation steps are done.

- -emit-llvm and -emit-llvm -S write output files with .o and .s
suffixes, respectively.

- <rdar://problem/6714125> clang-driver should support -O4 and -flto,
like llvm-gcc


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67645 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
b1ae14d18ce75793676b6992da4d2053a18ef9d1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Warn when 'clang' is used to compile a source file we could
conceivably handle, but are defaulting to not using clang for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67641 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
6256d3654533547a7996170647c21a859cb441e1 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Warn when 'clang' is used to compile a source file we could
conceivably handle, but are defaulting to not using clang for.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67641 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0ea85f7b9233049174bd3c494a1ac26122874279 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change default use of "clang" compiler.
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).

- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).

- <rdar://problem/6712350> [driver] clang should not be used on
powerpc by default
- <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx

I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.

This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67640 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0f99d2e57d8e3cf2508e7f9f868d41eccdc229c9 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Change default use of "clang" compiler.
- Don't default to using clang for C++ (use -ccc-clang-cxx to
override).

- Default to only using clang on i386 and x86_64 (use
-ccc-clang-archs "" to override).

- <rdar://problem/6712350> [driver] clang should not be used on
powerpc by default
- <rdar://problem/6705767> driver should default to -ccc-no-clang-cxx

I plan to add a warning that we are not using the clang compiler for
the given compilation so that users do not think clang is being used
in situations it isn't.

This change is motivated by the desire to be able to drop clang into a
build and have things "just work", even if it happens to get used to
compile C++ code or code for an architecture we don't support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67640 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1a9c8ca241f576c87e0230fc7c9103bc93d61a08 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Move ToolChain::ShouldUseClangCompiler to
Driver::ShouldUseClangCompiler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67639 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
af80e1ffafeb77929cc0b9ba8940a7f1c0b80d51 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Move ToolChain::ShouldUseClangCompiler to
Driver::ShouldUseClangCompiler.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67639 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
oolChain.cpp
oolChains.cpp
fdf1552e33e7fc30b558c688e7829009b6f10e11 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Translate -fverbose-asm for LLVM backend.
- <rdar://problem/6715707> driver should translate -fverbose-asm into
-asm-verbose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67634 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b3fd500a1c486e9fb82d82e28828ead025462aeb 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Translate -fverbose-asm for LLVM backend.
- <rdar://problem/6715707> driver should translate -fverbose-asm into
-asm-verbose


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67634 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d55809de94c2c69ec250d8950290dc16e868aaed 24-Mar-2009 Mike Stump <mrs@apple.com> Really fix cmake style builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67633 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
a43a21ef141fd2e814f4936ff0291a8306e00b97 24-Mar-2009 Mike Stump <mrs@apple.com> Really fix cmake style builds.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67633 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
217f5a060705fccb1dddc0a980821041c8f505f2 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Result files shouldn't be removed on failure when -save-temps
is specified.
- No easy way to make a safe test case for this (given where the
driver is supposed to put temp files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67632 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
9e3a224943163995d49c474f372c72ca91884780 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Result files shouldn't be removed on failure when -save-temps
is specified.
- No easy way to make a safe test case for this (given where the
driver is supposed to put temp files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67632 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
7c952c9d27956f78b4a5dfb39f3edb2189b0f762 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
-O optimization option wins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
fe2e04a979205c1f395b699a24d74adb82bb4833 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ArgList::getLastArg was in fact returning the first matching arg.
- <rdar://problem/6715818> clang doesn't honor gcc semantic that last
-O optimization option wins.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67628 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
5a73451b9441a3faf1ce174c05844e21ade60d52 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -MMD (not -MM) to clang-cc; this got lost in
translation, the former we support, the later we don't (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67611 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
546654a62eedb123b1b6d727ede29fd6cfb55087 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forward -MMD (not -MM) to clang-cc; this got lost in
translation, the former we support, the later we don't (yet).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67611 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
e19cbc34559a6b03b22e65f997cac4249c664433 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).
- Updated ccc & driver to look in libexec/ for tools.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67607 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
82fa7c5b9dc5024893a6e63a2550896f74962376 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Install clang-cc to libexec/clang-cc (instead of bin/clang-cc).
- Updated ccc & driver to look in libexec/ for tools.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67607 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ffd408a50adb01ae9c0ad92fb5f0981e1ca72df5 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
62c646e03609765228e1d410686fb56c4dec5bbb 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67583 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a428df828ea4cc6916ea90dcd9fbbc840776d207 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: lipo wasn't being called correctly (translation failure from
ccc due to the different way we handle output arguments).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67583 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
8e586ce05664e90ce4b344f52126756d950cf122 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make argument parsing fast.

On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.

On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67564 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
7547f74b52aa51f9a55105bd95cd25bcfa428e5b 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make argument parsing fast.

On a synthetic command line consisting of almost all defined options,
this drops wall time from .00494 to .00336 and user time from .00258
to .00105.

On the same benchmark, clang-driver is about 15% faster than the
primary gcc driver and almost twice as fast as the gcc driver driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67564 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
a957892a9fe1dc344faf6a44e228b6c3e73095e2 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix off by one in computation of first searchable option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67552 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
8a7e66d029d1cb485fd191624c5718c4919cd611 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix off by one in computation of first searchable option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67552 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ec0b90f275751a7fd00222b64970a25fe3b80e05 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.

Here is a more readable list than is in the diff:

W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.

f options: -fasm-blocks, -fmessage-length=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a880db0b0fc028abf754c290d921d809eec0518a 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two special groups of "whitelisted" options which we know
clang doesn't support, and don't want to warn are unused. Eventually
these should disappear.

Here is a more readable list than is in the diff:

W options: -Wall, -Wcast-align, -Wchar-align, -Wchar-subscripts,
-Werror, -Wextra, -Winline, -Wint-to-pointer-cast, -Wmissing-braces,
-Wmost, -Wnested-externs, -Wno-format-y2k, -Wno-four-char-constants,
-Wno-missing-field-initializers, -Wno-trigraphs, -Wno-unknown-pragmas,
-Wno-unused-parameter, -Wparentheses, -Wpointer-arith,
-Wpointer-to-int-cast, -Wreturn-type, -Wshorten-64-to-32, -Wswitch,
-Wunused-function, -Wunused-label, -Wunused-value, -Wunused-variable,
-Wwrite-strings.

f options: -fasm-blocks, -fmessage-length=.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67549 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
b1f0c697c8eee172eeb9de05a77b75c9b0975679 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Check that options are ordered properly (outside of
Release-Asserts mode).

Also, avoid searching through option groups (which will never match).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
b355692a7f9349e9af747b6b444ce56e9228a696 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Check that options are ordered properly (outside of
Release-Asserts mode).

Also, avoid searching through option groups (which will never match).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67548 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
49a35dedad7bae5a946e0d5c0bf16f4a914a1809 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Setup file and program search paths in tool chains.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67529 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
c50b00dbd843cd929b5f220d4a8699852249f64c 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Setup file and program search paths in tool chains.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67529 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.cpp
oolChains.h
2c1af14fcf122450558d902eb0f0116b90a48fb0 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop code for checking bounds in SeparateArg::render, this
situation should never occur now that arguments are parsed correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67493 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
3fe51c49b2f6fa592cf94d038d149071b55ac7fe 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop code for checking bounds in SeparateArg::render, this
situation should never occur now that arguments are parsed correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67493 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
fb88ce0e495979d0b663e98e82308e06dd6a11cb 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement 'missing argument' error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
ptTable.cpp
ption.cpp
b0c4df5c4df69a003f26b378eb95961bc7c486e5 23-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement 'missing argument' error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
ptTable.cpp
ption.cpp
bb187e6618b4a59f7d9f8ce48f1f43a6826a55d2 22-Mar-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR3859: crash with 'cc -V'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
378fd73b5721186f16b4510b7877f13939505160 22-Mar-2009 Nuno Lopes <nunoplopes@sapo.pt> fix PR3859: crash with 'cc -V'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67472 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
37dda8b6017b14ada6e5a563d3b3b4474312d111 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if
errors occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
af96def468042cfbed55a4cc12b1bb917ead4f33 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Give Compilation::Execute total control over the Driver result
code; and don't return an error code when -### is present, even if
errors occur.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67425 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
7b6dfbddac482c9b8a1deaf7d7236c2758418d74 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)

- This is sad, because it requires a fairly useless target
hook. C'est la vie.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
e33bea4ef34598e7a4a6a3a117392268998552d4 21-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: .s defaults to 'assembler-with-cpp' on Darwin.
- <rdar://problem/6669441> ccc doesn't handle assembler-with-cpp
semantics correctly (but clang supports it)

- This is sad, because it requires a fairly useless target
hook. C'est la vie.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67418 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
366c1852acabed8c78f53846afef35704bb3a4c7 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using -include-pth.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67393 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
049853d74ea052ed904de7e18ae51d6953177822 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Switch to using -include-pth.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67393 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
d9be90970ec5cfd2f132f66343b949e431adec19 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Parse Darwin version out of target triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67388 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
fc6a89964badf45cbe8e907cd1e1ea1765f5357b 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Parse Darwin version out of target triple.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67388 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
32a8df364b47c427d061ca85d14acc02d25c4726 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add and use darwin::Assemble tool.
- Based on patch from Pieter de Bie; thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67379 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
8cac5f7e1ce63dd77ee0fb4ef68f9fa804f41ea6 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add and use darwin::Assemble tool.
- Based on patch from Pieter de Bie; thanks!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67379 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
ools.cpp
ools.h
eefd914ea5580cc0e615e2c1bc18b09a386d020e 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option overload for AddAllArgValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ee51031c3734176d00723054c765538fcffc0984 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option overload for AddAllArgValues.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67377 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
7322593f4890c9389c81182a0a4afaf46415e027 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
38dd3d54186cf44ea9d37f463c3f2800ab526b82 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::getAsString and use when dumping arguments to
diagnostics.
- This ensures that the whole argument and values are printed,
instead of just the option name.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67366 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
3f158aac01dab061f337479b67e9018303c689c0 20-Mar-2009 Chris Lattner <sabre@nondot.org> strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67365 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
71061bfac28f85bcbdc75a63b8be784ffb67d1e3 20-Mar-2009 Chris Lattner <sabre@nondot.org> strictly evaluate SVN_REVISION so that svnversion is run once instead of 4 times.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67365 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
91b9e20fc3c4eecbe548f150fe10263a2589cd78 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -print-search-dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ca3459e95f552cfae6c9c5fb4ed161e3a662c25e 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -print-search-dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67362 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
86ea6746bef048e3e8cde881a5f54284d4868190 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Darwin tool chains.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67356 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
8eddb3fb6ff3dd20e3920380e1ce56df105b8a98 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Darwin tool chains.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67356 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.cpp
oolChains.h
b9b1fb2981ca07a64977763166e297217e0a6ab4 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Lipo tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67355 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
ff7488dc9a766f94daf54d81b03ab9160d0bfd88 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add darwin::Lipo tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67355 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
83138f01d2b2de5c37033770879401b3d897f927 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move tool chain implementations into ToolChains.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67350 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
3917608370583fa30c466b6c3893448229aea9ad 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move tool chain implementations into ToolChains.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67350 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.cpp
oolChains.h
8eeb5a369ee054f6c192824e6a7863461d2d28bf 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Temporary hack to allow -ccc-print-bindings to work (for
testing) even with -pipe on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67348 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b7b61b26868a09dc1471895d0d39ed6c28245207 20-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Temporary hack to allow -ccc-print-bindings to work (for
testing) even with -pipe on.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67348 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
dc938cda407ac5819534f90ebbe6b0758e8eba11 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver/clang: -mattr strings were not comma separated.
- Apologies for commits w/o test cases; they are coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67310 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
55b3b5f5c6c92f5dbb10dfe96a7de07a2b364338 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver/clang: -mattr strings were not comma separated.
- Apologies for commits w/o test cases; they are coming.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67310 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
0ef9a23251789b54da1c85b89e815318bc4193a6 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Compilation::Execute wasn't returning result code correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67296 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
56b10ab938f230dba1378830522850cb15dd4699 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Compilation::Execute wasn't returning result code correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67296 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
3c27dbc90645d3d5b77786c0d4dddf8b8be7c0b2 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Executing piped jobs with a single command is easy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
ceafbc8f55e00345a85d5e6674d3339a45cbbf76 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Executing piped jobs with a single command is easy.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67295 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
923e703ff2c94aec73c7993297218c6664d6b24a 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
05494a78c3746a360e81fc1d1797ce52df415b54 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim unused input arguments when emitting "input file unused"
diagnostic (to suppress more generic unused warning).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67294 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a345a4459ede5216833ef3e0c407fbc901337724 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC.
- The later is unfortunate, as it prevents us from generally warning
about anything interesting on platforms that use a generic
toolchain. However, we can't do much better without significantly
complicating things, and generally we should have proper tool chain
definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67293 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
7587719c40ebf02bf11e5e66c30bd20e98edebc2 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim -arch options when pipelining, and claim arguments that
are forwarded to GCC.
- The later is unfortunate, as it prevents us from generally warning
about anything interesting on platforms that use a generic
toolchain. However, we can't do much better without significantly
complicating things, and generally we should have proper tool chain
definitions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67293 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
c3be67b03fa5eb194e7605df74265a383e3ed262 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "linker input" arguments.
- Make InputInfo a variant of filename, pipe, input argument,
nothing.

- Leave a FIXME in InputInfo that this should be revisited.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
ools.cpp
115a79277edababaf1b26e3654044ae983197679 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "linker input" arguments.
- Make InputInfo a variant of filename, pipe, input argument,
nothing.

- Leave a FIXME in InputInfo that this should be revisited.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67292 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
ools.cpp
79ba44da3437146a9cc3fec5cd16443ec2e361a1 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
42f7fc23044cc736db77878734258d35ad3dfe66 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::renderAsInput; this is a messy area and something I
was hoping to clean up in the rewrite, but I don't see it yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67291 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
e3ca766fa746f3c1044d95ee85aa5b50a34765cd 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix bug in translating -O to clang, add clang-translation test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67257 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
5697aa0d75c87bafec78984048d558f8d12ca1b3 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix bug in translating -O to clang, add clang-translation test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67257 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
a796bee31cbd0133f7edd6c3de210214854b24f9 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve program path for "cp" (used as part of transparent gcc
PCH support).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67256 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ecc636272b9d1bf0e4b9872a576d8ad2b689d146 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Resolve program path for "cp" (used as part of transparent gcc
PCH support).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67256 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
bac6b640448e780ef557c9b6b02a0ae29f2c58ab 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forcibly disable pipe support until we can execute them, the
driver is functional without them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67254 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
60ccc7677a5416df3a8f8bde79ab35f85cb66e14 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Forcibly disable pipe support until we can execute them, the
driver is functional without them.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67254 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9083abea65ce3b72fafbd03aad5b587ad7d5db71 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Delete the temporary files llvm::sys::Path::makeUnique
sometimes leaves around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67253 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
84603bc4ed98caca9b82c1a68e63939927d8cd6d 19-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Delete the temporary files llvm::sys::Path::makeUnique
sometimes leaves around.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67253 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8787c5142a53dcb27eca8036a159f54a0a5907aa 18-Mar-2009 Mike Stump <mrs@apple.com> Make -j8 safe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67252 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
c8ea24e7729895fce09a1805bbcddcceea48e2a6 18-Mar-2009 Mike Stump <mrs@apple.com> Make -j8 safe.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67252 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
1fef88d69733424179f5b90632e116101d7010e0 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Execute jobs; no pipe support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67250 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
49b98e700e300b8a61b2f7fbb0bb22264e8ec27a 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Execute jobs; no pipe support yet.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67250 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
31a76e3eee82b52694c3f7e2b8fcb89fb364f407 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Cleanup temporary/result files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
e530ad407af4a8904377592bfdb236acd320c6c2 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Cleanup temporary/result files.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67248 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
cb84b9a73e172be3df53f2cd57fd31c44622990f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Lookup program names using llvm::sys::Program::FindProgramByName
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.

Also, have GCC tools lookup gcc program path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67243 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
632f50edc08c76ebc643a0d4871bae33a55d7b4e 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Lookup program names using llvm::sys::Program::FindProgramByName
if our usual methods fail. This isn't necessary for running the tool,
but improves the accuracy of logging output.

Also, have GCC tools lookup gcc program path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67243 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
1207fae6d24d072b867c76bc7d515471435cb1ff 18-Mar-2009 Mike Stump <mrs@apple.com> The eventual name of this will be clang, might as well start now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67241 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d227fe7ee0af4f96b96598d9b98bff66a25d06a2 18-Mar-2009 Mike Stump <mrs@apple.com> The eventual name of this will be clang, might as well start now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67241 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cc7600c5c957e9c6fe15b9fc947ec6a2b8af25e6 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support ToolChain specific path lists to search for files and
programs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
0edefebc10fbc627d55d53936fc66178d1c08da1 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support ToolChain specific path lists to search for files and
programs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67229 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
169db43ef1be04e9154380cd6fc41e300c764e6d 18-Mar-2009 Mike Stump <mrs@apple.com> Move generated file to ObjDir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67225 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
8f12e2704f2ccf516ccf2caf1aea002aab97028b 18-Mar-2009 Mike Stump <mrs@apple.com> Move generated file to ObjDir.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67225 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
b6ddc9573ba61f8d06b522c512c1f78f5b9dbea1 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Construct temporary file names.
- This is still suboptimal, but should at least be workable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
214399ebd73545dde02b4a45872e7ca9e1d9e742 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Construct temporary file names.
- This is still suboptimal, but should at least be workable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67223 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3fc58f02009e0985ced75bffa57978ce59588256 18-Mar-2009 Mike Stump <mrs@apple.com> Add revision information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67220 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
8944c38c2a14b038fee7d7ebfe8b9c851b51fd75 18-Mar-2009 Mike Stump <mrs@apple.com> Add revision information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67220 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
46c70827d3d346c736fac4e6511a74e361688f63 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
af2e4baa2a75471e820030701225a1ca02c7308f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Don't warn about unused arguments if there are Driver errors
(brings code in line with diagnostic.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67217 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
bc927290a1fcbb62ce1931c93bdf89ecc919d0ee 18-Mar-2009 Mike Stump <mrs@apple.com> Fix URL trimming for version information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67206 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e70295b5c99c29e5792649b87d8455dfef209ac8 18-Mar-2009 Mike Stump <mrs@apple.com> Fix URL trimming for version information.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67206 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
74d9447e658d9dac6545c7bd7edaf102ffbe2b03 18-Mar-2009 Mike Stump <mrs@apple.com> Improve version number.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67204 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
5d023c3edee981a70d4955ac0cb22bd01817c788 18-Mar-2009 Mike Stump <mrs@apple.com> Improve version number.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67204 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
akefile
b4266ea0b557935691f48e591577b6edf65c4900 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Port Clang argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67193 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
1d46033f760ba5fd266ce59fe391fac473f04f52 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Port Clang argument translation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67193 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
58a5126614da1ec8358f4a4e544ec2f78df08543 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Bug fix, derived .gch names sometimes started with "/".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67192 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
56c5594515571eab0e02368ed05416b9dac20837 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Bug fix, derived .gch names sometimes started with "/".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67192 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3a4dcdff6934a670b6ed4f4ced3d56945eb6a8d7 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
forwarding all arguments matching a certain set of options to the
tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
18a7f33af877fca8f72cfde00d52f4aef600547f 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add argument translation utilities to ArgList.
- Support things like telling which -ffoo -fno-foo option won, and
forwarding all arguments matching a certain set of options to the
tool.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67189 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
09c3aa5a90ef639bf15b9daaf108486aa05ed837 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Lift out common GCC tool and implement generic GCC tool
argument translation.

Also, stub out clang tool implementation a bit more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67185 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
b488c1dac8e53206f07103d794a62a3f5012c0f4 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Lift out common GCC tool and implement generic GCC tool
argument translation.

Also, stub out clang tool implementation a bit more.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67185 91177308-0d34-0410-b5e6-96231b3b80d8
ools.cpp
ools.h
2f5f7e0b9ad26b253ac1e1f39364a0dbf926445e 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add assert and FIXME; arguments which act as linker inputs
(e.g., -filelist) are currently broken.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67183 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d09986a6fb193d429863184bffac21340dc6eb11 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add assert and FIXME; arguments which act as linker inputs
(e.g., -filelist) are currently broken.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67183 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9e7b670886d7e5936bb6e5b6de91d4c2e9b3c640 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide Arg::render implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67182 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
21fd6ac7ae51d0176ccbfcfde3aa276e298dccaa 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide Arg::render implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67182 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
5591e8d604aba4163994f2906f906fda4ab9ef86 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add "d" flag to Options.def for options which are completely
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.

- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
6d954d788925e6b80077ef379c8eeb028cc31d0e 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add "d" flag to Options.def for options which are completely
handled by driver.
- This is not very precise, we use it to drive the "forward-to-gcc"
predicate, when trying to talk to a generic gcc tool.

- Slightly better than what ccc was doing, and should be good
enough. Platforms which want a robust driver should implement a
proper tool chain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67181 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
933ac4568614ff525639e2d077b721b80c453154 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ConstructJob also needs to know the destination (where to put
its commands).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
ob.cpp
ools.cpp
ools.h
871adcf4e41285e3f4c3b62eaa1b2e05b60b92da 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: ConstructJob also needs to know the destination (where to put
its commands).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67179 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
ob.cpp
ools.cpp
ools.h
4bb03cb404def76e913efd3b926c70a9f9eb3df6 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print version on stderr to match [gc]cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67178 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
aa469f62f2b3ba6f560ccadfc379f8f4c45e3d51 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print version on stderr to match [gc]cc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67178 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1b265978eb3a9b001c15f39cec70c63cb2a05c44 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -### (hard to tell, since we don't actually
construct any jobs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67177 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
24b5560b6ea51b8a260194710468fa060775fc01 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement -### (hard to tell, since we don't actually
construct any jobs).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67177 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
dcc59805a974107bff680cfb8cc514d6f38b2e6c 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim inputs when we bind the InputAction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67174 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5ab483b2c88ba61c97e0e3cab3b1aaad77b26d26 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Claim inputs when we bind the InputAction.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67174 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7e4387447ed822f95f47bb4847a5e6dee2f93064 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rename Command::Argv to Command::Arguments to make it clearer
that this does not include the implicit first argument (the executable
name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67172 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
d57ac5990d22592665a67a28fc5d39f1155424d3 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Rename Command::Argv to Command::Arguments to make it clearer
that this does not include the implicit first argument (the executable
name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67172 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
524d5bc11d774803aa507d7049d670c50d00adaf 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Don't claim inputs when pipelining, a tool should eventually
claim these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67171 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
028801c66f37d6765ee98f2b1c79e74280ca73e5 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Don't claim inputs when pipelining, a tool should eventually
claim these.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67171 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
be4533875746acc5b7ea98de41b9ea4051819920 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add a dash of const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
62cf601812e03dd9bc5df42b8ef06a0cdedc38bf 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add a dash of const.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67170 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
00fd37960476697fe729a16f8c2c55213d6ef1d4 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Tool::ConstructJob.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
47ac7d27c44bd64a7d0fc03d4babc196cf2b8230 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Tool::ConstructJob.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67169 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ools.cpp
ools.h
e564028b7f7c5905eaa6e2983a47be75a71096f8 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix Compilation::getArgsForToolChain, local variable was
shadowing member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67167 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
aa3e0d292065fd50713b4c70647063c32d99a36a 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix Compilation::getArgsForToolChain, local variable was
shadowing member.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67167 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
d78126fb377f344089ceca2f442647bd0a200013 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two normalizations for powerpc.
- PR3830


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67166 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c811b6c5e3ad403c535fba25a03c956599ff27a5 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two normalizations for powerpc.
- PR3830


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67166 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2b856ce04ee93882c46e6642314d98d7e4f14a83 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67162 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
10ffa9a4887d9376e3eb3598e40523d1b58773c9 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ditch Driver::DefaultToolChain, this can vary between compilations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67162 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
7d692760da83c336be528b906c308cb25aaba67c 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: I was too hasty in free'ing Actions, we sometimes share
Actions so a simple tree traversal isn't quite good enough. Leaving a
FIXME for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67161 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
e29cd6f24689e670730623f012586234527f6dc9 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: I was too hasty in free'ing Actions, we sometimes share
Actions so a simple tree traversal isn't quite good enough. Leaving a
FIXME for now.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67161 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
6f2979fc4afec06c0563d312aec091fa9a8a8c18 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Initialize Arg::Claimed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67160 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
6d91b04c143e28c40f7141678a4802cd697faaa4 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Initialize Arg::Claimed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67160 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
73f7b8c73ad89e96bfdea06b56528f102a431b88 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move actions into Compilation, and construct the compilation
earlier.

- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.

- We now free Actions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ompilation.cpp
river.cpp
oolChain.cpp
21549237f14505cfc2a18a06416372a36229d0ce 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Move actions into Compilation, and construct the compilation
earlier.

- This gives us a simple ownership model, and allows clients access
to more information should they ever want it.

- We now free Actions correctly.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67158 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
ompilation.cpp
river.cpp
oolChain.cpp
fb5e3338cefb1ad447666b1d43c12a0bb0588fa5 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test for binding of precompile; exposed bug due to my
flawed idea that llvm::sys::Path::getBasename was a version of
basename().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67153 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5796bf4913832bd1165c3ff5e04838d150de1c4c 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test for binding of precompile; exposed bug due to my
flawed idea that llvm::sys::Path::getBasename was a version of
basename().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67153 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
839cc9ae8969cdff0957abeb2641ba07551f6fc1 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement JoinedAndSeparateArg::getValue and add parsing test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67151 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ec29d3635b351095ac947dcd03cb2437ed92fcf5 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement JoinedAndSeparateArg::getValue and add parsing test
case.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67151 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
b1dd58a6ccc4f3d1a5564a134ee7cc03b94eeef5 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: UnknownHostInfo was always returning 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67150 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
b25c7c1f83b80738cc01cac1b04e6ea25664bcd7 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: UnknownHostInfo was always returning 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67150 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
16e04ff3b6cfee92c56be7a50da704b8431ac300 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use PrettyStackTrace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8f25c79e59d88df41c5a3cabba1c58035d384a6e 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use PrettyStackTrace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67149 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
2f8b37eed0ce808abbaeb1fb850416dd57904cc3 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Release Host, ToolChain, and Tool implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67146 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.h
7e4534d9c14febcdea30c057bb2a36e245776865 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Release Host, ToolChain, and Tool implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67146 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
oolChains.h
4d7ef119704fca522c466e93055f54b985c45f6c 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test case for -ccc-clang-archs (which, it turns out, was
inverted).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67135 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
d46f0acef540c3030f7b40525fb732fc343dcfad 18-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add test case for -ccc-clang-archs (which, it turns out, was
inverted).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67135 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
07c9a1d3de9711e052206cee39d26d26dccc9c31 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -ccc-print-bindings option (for testing); the Python
driver has no corresponding option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67125 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
5c3c1d7b494660ba5e8983ee4584622750725ac2 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add -ccc-print-bindings option (for testing); the Python
driver has no corresponding option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67125 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
eed1b4206be7cc0df6e18db75ea00263adbd7b5b 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add name to Tool (for testing/debugging) and move GCC_* tools
into gcc:: namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67120 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
oolChains.h
ools.h
31b1e5437e7435879fc044afb77ff27096008e72 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add name to Tool (for testing/debugging) and move GCC_* tools
into gcc:: namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67120 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
oolChains.h
ools.h
8db5bfd70add9f0b1e3268338f7f03d3d27643a2 17-Mar-2009 Chris Lattner <sabre@nondot.org> GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67112 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
aae82f1a9110db0069bc61ec018dafe14e062872 17-Mar-2009 Chris Lattner <sabre@nondot.org> GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67112 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
7c76412e934c18eb848c46ebf54f51e085f6bf57 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67110 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.h
985b825eea7387be10478de0430815ed6a673326 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: GCC 4.0 isn't happy with VISIBILITY_HIDDEN on a namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67110 91177308-0d34-0410-b5e6-96231b3b80d8
oolChains.h
ools.h
542fae9e067b50d562c9de265a52b3fea4da7ad0 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection (missed a file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67109 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
9c073ff462eb75ccbb1c4446e21c148f3fc618e1 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection (missed a file)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67109 91177308-0d34-0410-b5e6-96231b3b80d8
ools.h
b5d3e9547d8ce2d566cacac0ddf5708689ef1f24 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67108 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
oolChains.h
670b7f4fe6720e91520ec5a993b33c00058ed77a 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool selection.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67108 91177308-0d34-0410-b5e6-96231b3b80d8
ool.cpp
oolChains.h
a12df5cc4824d1021850828b300d10d110e1604b 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool chain implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67107 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.h
83b08eb6d2a7f71328db51baa79c654bb9dcc55d 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out generic GCC tool chain implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67107 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
oolChains.h
43a36806116faf4f8a26f092389318dad7bbdc07 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make sure to get the default arch name from the tool chain, not the
host; the toolchain may differ based on command line arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
baf07759bc5ccd6f4cab62a2d7ea23321ced7492 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make sure to get the default arch name from the tool chain, not the
host; the toolchain may differ based on command line arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67106 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cd5386954ad3146ac973237c909d9c21759d30c9 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass HostInfo reference into ToolChain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67105 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
fa0cda430f7324404ddd74f41a3b8f5f749d7ec1 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass HostInfo reference into ToolChain.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67105 91177308-0d34-0410-b5e6-96231b3b80d8
oolChain.cpp
08966caa2b46f3a963299ef50102cf7a28312825 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
e504952bc89f79fc9ff54d5641ab30bb07ec435e 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
4b84bf905fbf936c9fb99c6e344c91dc670e6024 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix typo ArgList destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67101 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
ec504fdfef7d4983f76b90c6bb28e438ab2ffbb7 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix typo ArgList destructor.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67101 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
7424b8a2c4d6ecb1f6b0360f146a84862f2354aa 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Hide HostInfo implementations.
- Also, normalize arch names a tad and stub out getToolChain
implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67091 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
1fd6c4b8abbbdcbae0e221f35100102112dabff2 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Hide HostInfo implementations.
- Also, normalize arch names a tad and stub out getToolChain
implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67091 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ostInfo.cpp
35f55a2724cd51049cb7303144ee27c0fab34dc8 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option form of ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
cd4e186cdc1db0dcac937eb20afe8b5f5ff1a38d 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add two option form of ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67090 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
01fb26a9fd7a5550d736b70f9ac8462a764b66f3 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67088 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
441d060838a5797691777dfcc992ff836b73dcd1 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add logic for computing where to put job outputs (pipe,
temporary file, user provided name, derived name).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67088 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
019b241c8b5d6929f15168bb97eeb614a2729d73 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
is primarily a list of arguments; we want to allow clients to still
add argument strings to an ArgList to avoid worrying about string
lifetimes (or unnecessary string copying).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67086 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
3494bb1e01eb5f90d4dc9c91b912daf945da4ff5 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Add ArgList::MakeArgString and make ArgList::Make* const.
- Slightly strange, but the idea is that the ArgList data structure
is primarily a list of arguments; we want to allow clients to still
add argument strings to an ArgList to avoid worrying about string
lifetimes (or unnecessary string copying).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67086 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
bb0875551134e8a2dcf1908ad82c00e54cf065dc 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix unused variable warning in -Asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67073 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
70c168488b9cbadeb66e994c210a69ce4326adf2 17-Mar-2009 Daniel Dunbar <daniel@zuster.org> Fix unused variable warning in -Asserts mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67073 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
026a2ef889178bbf6707465b73909aa38aaf7e6b 17-Mar-2009 Douglas Gregor <doug.gregor@gmail.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
a393e9eedcc28b25f521a4feceb3b56e3d0d360f 17-Mar-2009 Douglas Gregor <dgregor@apple.com> Build system changes to use TableGen to generate the various
diagnostics. This builds on the patch that Sebastian committed and
then revert. Major differences are:

- We don't remove or use the current ".def" files. Instead, for now,
we just make sure that we're building the ".inc" files.
- Fixed CMake makefiles to run TableGen and build the ".inc" files
when needed. Tested with both the Xcode and Makefile generators
provided by CMake, so it should be solid.
- Fixed normal makefiles to handle out-of-source builds that involve
the ".inc" files.

I'll send a separate patch to the list with Sebastian's changes that
eliminate the use of the .def files.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67058 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
7ce6adde549f61daff167128dadfc0fad8a9c11f 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement majority tool binding logic.
- Still need code for determining proper output location.

- Doesn't work yet, of course, as the host isn't providing real
tool chains.

- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67038 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
f353c8cc2ee1cc16ff194b399a8d951f707fb129 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement majority tool binding logic.
- Still need code for determining proper output location.

- Doesn't work yet, of course, as the host isn't providing real
tool chains.

- Interface still has a few warts, but has gotten a nice bit of
polish during the rewrite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67038 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
nputInfo.h
9d625e1c4e1e2931bad73515d051e0f2a090ceec 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Migrate some data into the Compilation; after pipelining
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67037 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
586dc233bb88f2920c9f3638f69cef0ccd55dced 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Migrate some data into the Compilation; after pipelining
access to most data should go through the current Compilation, not the
Driver (which shouldn't be specialized on variables for a single
compilation).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67037 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
e1cef7d00e0f9ac3afeac2284bbcfd1abda7c5ff 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Tool and ToolChain classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67036 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ool.cpp
oolChain.cpp
2ba38ba9a18b8ec88e2509fad622eeec01562769 16-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sketch Tool and ToolChain classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67036 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ool.cpp
oolChain.cpp
321c12de403caa7b78d82d1e9e816ac7627237ff 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: claim input arguments when building phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67016 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
411f2e42f5f8cd715d39664ed662668af437b16d 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: claim input arguments when building phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67016 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
c413f8223307f9578ddb67eb184e794205d6c9f7 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start warning about unused arguments.
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67015 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8d2554a2c3201aa664cbf2108cf9d57aa0aa4b0a 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start warning about unused arguments.
- This has a number of current flaws, enabling now to flush out
problems while bringing up other parts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67015 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
e9c70fa179dff6bd5e0c8c9efb5d347c2ff985eb 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
8022fd46d45005de63306a7513aece20a1be16ed 15-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Update ArgList::{hasArg,getLastArg} to optionally claim the
arguments if they exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67014 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
river.cpp
50e035e408ae0217c0cb0fe8f142cd37ae886230 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::{isAcceptedByClang,isCXX} predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66986 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
4db938ceb72dbaa5f7b50f6420a72629acbf29eb 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::{isAcceptedByClang,isCXX} predicates.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66986 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
56085246b0e1ea62320c484df82c4397f45eb41b 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add simple Job classes, simple wrappers for information about
what processes to execute during a compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66985 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
789e220d481371d52bd6265b5c414c5fe277f76b 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add simple Job classes, simple wrappers for information about
what processes to execute during a compilation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66985 91177308-0d34-0410-b5e6-96231b3b80d8
ob.cpp
2c8e6f3db0304116e87e5e962ebf9c8ecefae659 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Action vtables were still hungry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66980 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
0c3f599bcaf79302caae6183464c9fe4532cbcd2 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Action vtables were still hungry.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66980 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
d436b8ed860b2bebce2906fa734766b890c801c9 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide food and shelter for Action vtables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66978 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
f40ed17472a39097cc5039ed437445289487c9bf 14-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Provide food and shelter for Action vtables.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66978 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
47d762ee90d6d91fb851a41d833b4bdc2ad480ea 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sprinkle some consts in, stub out BuildJobs method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
57b704d8d8f49bcaf856a3e37941d5ac6456eb50 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sprinkle some consts in, stub out BuildJobs method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66968 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b1873cdd962f232b47dbd7629adedd5f30872508 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: For universal builds, handle archs in the order they were seen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66939 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1368954db9ce2989ed8f03f5c65e8ee775a5229a 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: For universal builds, handle archs in the order they were seen.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66939 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5cb75d6774ef9739c6fa1c509d26d9596a05e918 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix '-x none' handling.
- Enough stuff works now we can test argument parsing & pipelining.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66913 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
83dd21f6b4e6e109b893c0d42bc81e4883c342f7 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix '-x none' handling.
- Enough stuff works now we can test argument parsing & pipelining.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66913 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
3329951736b9b7c27097054102244b95b115ea72 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Normalize phase spelling in -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66912 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
hases.cpp
209333506a935c582a7d62ad470978baec71afdc 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Normalize phase spelling in -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66912 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
hases.cpp
dd863aa6f9b9514480ff6b7e6f927eb6cc9835ff 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Some minor bug fixes.
- language recognition was recognizing prefixes incorrectly.
- -x none wasn't working.
- test for "can lipo" was backwords.
- missed a '"' in -ccc-print-phases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
3dbd6c51bcd8a730c3fe58e29d7e0d999a94fa91 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Some minor bug fixes.
- language recognition was recognizing prefixes incorrectly.
- -x none wasn't working.
- test for "can lipo" was backwords.
- missed a '"' in -ccc-print-phases


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66911 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ypes.cpp
44925ccec931c87ac0dcb2c94784424d6aec3ced 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix think in ArgList::MakeIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66908 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
c0dfd53634494872d9560bfa30c0cad6759e4cea 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix think in ArgList::MakeIndex.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66908 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
88c9eae831fae2977a61ab252eb565cc0c675ab4 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Return 0 from BuildCompilation on -ccc-print-phases,
-ccc-print-options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66907 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ab835430b4f758dd49903251c7c7f21b95933c89 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Return 0 from BuildCompilation on -ccc-print-phases,
-ccc-print-options.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66907 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
9dc28b8c92d31dead337d14fc457fa17d6ea4b7f 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print -ccc-print-phases on stderr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66906 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b269c32596dadf9f653cfffae6981d27e6eebc2e 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Print -ccc-print-phases on stderr.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66906 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
44119a1380375f7287d37b47ab7baccc4455eda6 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in Darwin host identification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66889 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
a88162c1b3922f64914c55ebe2c558881e960426 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in Darwin host identification.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66889 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
494646bbd807879ba5ec2d7209adf188f091a42c 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66888 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ba1021388e6839b76c8968b931189361c7286674 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Support -ccc-print-phases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66888 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
612bd74ddac1eb9e71e06aac65c3fb165fc617f5 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add cast<> support for Action, and some other accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66887 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
85da0071a4ab7d6f06831d20bad79122d7407df7 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add cast<> support for Action, and some other accessors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66887 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
85cb359c04709148c2ef29c4c5c204fc7bd53e85 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Complete "pipelining" (building the list of abstract actions
to perform). Still doesn't do anything interesting.
- This code came out much cleaner than in ccc with the reworked
phases & mapping of types to lists of compilation steps (phases) to
perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66885 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ad2a9af666efdd9afe3bb5f886bcb0d1c9a0f0c3 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Complete "pipelining" (building the list of abstract actions
to perform). Still doesn't do anything interesting.
- This code came out much cleaner than in ccc with the reworked
phases & mapping of types to lists of compilation steps (phases) to
perform.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66885 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
16606030d71f8c9a62301c274b8d7797c84e859e 13-Mar-2009 Gabor Greif <ggreif@gmail.com> support cmake

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66884 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
3279575a374b6f28e81cebd32cc83c7a6c15a9ce 13-Mar-2009 Gabor Greif <ggreif@gmail.com> support cmake

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66884 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
7f12dd6200e2a0ac1ae3dc18bd5dae7e1f31623d 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make phase names nouns not verbs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66883 91177308-0d34-0410-b5e6-96231b3b80d8
hases.cpp
3de1e7c5776634e6c58b542a72fe64981e86e6ad 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Make phase names nouns not verbs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66883 91177308-0d34-0410-b5e6-96231b3b80d8
hases.cpp
7c32db8a63b30571b5d5b5cfa9f9e2d2dfb84803 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::getNumCompilationPhases, getCompilationPhase to
provide information about what steps should be done for a particular
file type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66881 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
c1b5fa81a2dfa4fea2e25bf057363658e7b43681 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::getNumCompilationPhases, getCompilationPhase to
provide information about what steps should be done for a particular
file type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66881 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
d6a1554f3f1e1c0be8591c4838e12e8951da5345 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull Phase info into separate file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66880 91177308-0d34-0410-b5e6-96231b3b80d8
hases.cpp
b1efcd824cad12284037cbb63e0312d16ac5c95a 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Pull Phase info into separate file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66880 91177308-0d34-0410-b5e6-96231b3b80d8
hases.cpp
b043ebd02d72e4bcb51ae9b63fa05c3c7da6ab83 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ignore empty arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66858 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4139340644a0a41c2529c183c4b60bb55c3fdc79 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Ignore empty arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66858 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cc006894663904e265ab3337042eb8910250f3a0 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "immediate" options.

Also, add some FIXMEs, improve doxygen & comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66857 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
cb881672c2c46142ec1bdfa401c9818ae805db0f 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle "immediate" options.

Also, add some FIXMEs, improve doxygen & comments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66857 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
5a5ec5cb087bf87e189c5d9c5a7cedc71f5f0d9a 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Mark {dump{machine,specs,version},
print-{multi-{directory,lib,os-directory}, search-dirs} as unsupported
instead of handling separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66848 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
8b1604ece7bf6dc2ba811cd7d8767557e55e2ec2 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> ccc/Driver: Mark {dump{machine,specs,version},
print-{multi-{directory,lib,os-directory}, search-dirs} as unsupported
instead of handling separately.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66848 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
207a56d26e8d96126acab5314f33411b7c7b083b 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Determine which compilation stages to run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66844 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
af61c71137d1f7239d6b9d7425ce083db7ba31df 13-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Determine which compilation stages to run.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66844 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
386ee6f86e4028cbc8e86424eba6d356b78302a9 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Value initialization is nicer than memset.
- Who wouldn't want correctness to hang critically on two easily
ignored characters?

Thanks Doug!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66819 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
9aecfabe3f2821c58421df1ef7dfff7b54f11b74 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Value initialization is nicer than memset.
- Who wouldn't want correctness to hang critically on two easily
ignored characters?

Thanks Doug!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66819 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
fba157b8beb4597864d34b3ae4f6c795dc7a2be0 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add majority of driver-driver implementation.
- Compare to driverdriver.c if bored; not completely fair since the
driver gets a bit more code in other places to handle binding archs
(for Xarch) but not completely unfair either.

Fear not, extra Action classes will have a happy home for their
vtables soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66817 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
2fe63e6adac0b9e5f52bcc3100b545e379417e6e 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add majority of driver-driver implementation.
- Compare to driverdriver.c if bored; not completely fair since the
driver gets a bit more code in other places to handle binding archs
(for Xarch) but not completely unfair either.

Fear not, extra Action classes will have a happy home for their
vtables soon.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66817 91177308-0d34-0410-b5e6-96231b3b80d8
ction.cpp
river.cpp
015ba9faf0907e0befa8f0c63c959e07176bb3d9 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop some unnecessary uses of clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66813 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
ypes.cpp
ba7db7d8b4ea8f9c24aba8c75a228ffc0857964e 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Drop some unnecessary uses of clang namespace.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66813 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
ypes.cpp
a790d3751be0fcf7bc0b0cffa74c1237ef9555df 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce ActionList typedef, tweak some constness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66809 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
d65bddcbe1385a4de212ecbbdc8919c54b3efeb0 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Introduce ActionList typedef, tweak some constness.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66809 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
1c41167bd9e6bea4ff21968785d873142e3bcb76 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::canLipoType helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
9f5ef9426fee383cb42b72cee1d6dc949c8c0189 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add types::canLipoType helper method.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66807 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
72cac2064e7d199b3032ada8dca88e1ac034d22b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList support for synthesizing arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66805 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
bca58cb5100a4fdff63165af6a1742f5160ec73b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList support for synthesizing arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66805 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
08a0ae49b107c1a974a281399c11cec4d72d7d1b 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
0c562a23a6560b5736077226ab31d6a9a216ccd3 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::getLastArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66794 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
d724e335b1724f9978e688a957355daf463e4203 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak diag names to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66787 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b897f5d3ebfb62c2745e2e2af7faa9920c882438 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak diag names to be more consistent.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66787 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
93468495c02e53c3e6a9f92335496a6fd32bb9fd 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use standard Diagnostic interface for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
4ad4b3ebbe5769143389dccfcfadb666a4ba5940 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Use standard Diagnostic interface for diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66786 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
133862ce7eb688b218d347715735819e61166587 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in Arg::hasArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66785 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
e7fffa14dc50091200b778a747acad15a254626c 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix thinko in Arg::hasArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66785 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
e12f8d62a81ecb59f7c0db3e50e2778529c3d6a3 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: '-' is parsed as an input.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66784 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
a948045b43e9f102533f85a1b64ddd26c0077e8a 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: '-' is parsed as an input.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66784 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
db62cc311476c2eb2bcdb6305db83be64de7b295 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start sketching construction of abstract built actions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66783 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
53ec55215075c8f4ddd47ca6ed7d382f16beb670 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Start sketching construction of abstract built actions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66783 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
dda962937192c35fc0c63b93ff3b7432c240bdc1 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add information on Driver input/temporary types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66781 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
e9fba573bd9433b89a12f747f2c4ccfa490a79cb 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add information on Driver input/temporary types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66781 91177308-0d34-0410-b5e6-96231b3b80d8
ypes.cpp
5a860da2b9208b5f092333a53748357ac7b81be8 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66774 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
644eade617a4e2e665455accf18c455e8d025699 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66774 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
52bf2d4eebdda3762feb22f24e1501ce82752141 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak option naming/def:
- Use OPT_ prefix for ids.

- Reference groups and aliases by shortend id (on the theory that
this is more readable).

- Rename the special option ids to more protected names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66767 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
b349fccc4a6e416483b0b36b4f74e39787c62344 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak option naming/def:
- Use OPT_ prefix for ids.

- Reference groups and aliases by shortend id (on the theory that
this is more readable).

- Rename the special option ids to more protected names.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66767 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
ff7aa37801a61b1be92012d3c33b59a1205ac044 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Reorder arguments in Options.def so option name is first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66759 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
e1495eced887466e235f6a034953adf5ee1e14e6 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Reorder arguments in Options.def so option name is first.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66759 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
f01869c9151325005739f900cf3996af656134d7 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66758 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
d8cadd4f250d1b69373fc80477f67375d2c54820 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66758 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
214bf9dd6c2d72cdcfa937b75af4509d289dacfd 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option::getId and Option::matches taking an option
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66757 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
cf0dd156e7b9d6a70b7290f5af9646859631bd9a 12-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option::getId and Option::matches taking an option
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66757 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
c1376b6966bb3d2be8dd72a1c88c9bd3e633718c 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info (add new files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66603 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
e399564a230846b3a3044855a2b11c4264d2d776 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info (add new files).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66603 91177308-0d34-0410-b5e6-96231b3b80d8
ostInfo.cpp
d25acaab6d1969eb4fc2ff187667947ffd795e57 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info.
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66600 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
dd98e2cad165ca73c769e4f105a4e47c2216387a 11-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add host info.
- Replace assorted -ccc-host-* options by -ccc-host-triple which is
more sane.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66600 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
b282ced133d3ca061cfff3fafbad11d00bde9039 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle magic -ccc- options.
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66575 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
365c02f65be026f90e67a8e00e7b827cee60e228 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Handle magic -ccc- options.
- Follows ccc currently, but this functionality should eventually be
outside the Driver lib.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66575 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
24c169debdbe1f6779664296f1b831eeb00bc051 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove some now-unneeded calls to llvm::errs().flush().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66555 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
ption.cpp
4a77edb3f0fabc8e214a3d5636c4d0aff031645c 10-Mar-2009 Daniel Dunbar <daniel@zuster.org> Remove some now-unneeded calls to llvm::errs().flush().


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66555 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
ption.cpp
7d61430a56bbe75a0ad3e0eb0fb6884699652400 07-Mar-2009 Mike Stump <mrs@apple.com> Fix warnings in build on clang-x86_64-freebsd buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66344 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
2ace928d2799dfe4f2e0f6e5a15196e30dedc04a 07-Mar-2009 Mike Stump <mrs@apple.com> Fix warnings in build on clang-x86_64-freebsd buildbot.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66344 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
7dc2a04e65423b263e6270f0907e06b7d3dfa435 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
ption.cpp
0648262df75d97b464c2be0ed867da3615659785 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Basic argument parsing.
- Add Driver::ParseArgStrings.
- Store values directly in CommaJoinedArg to support simple access.
- Add FlagArg class.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66142 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
river.cpp
ption.cpp
8e05237ec34a1301d9870abf10a6ce5ac4757d6e 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement Option::accept methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66106 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
ption.cpp
bbf842bb27c6e964359111b6a72a5f948c56fc41 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Implement Option::accept methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66106 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
ptTable.cpp
ption.cpp
0605d29257a00b4da6116c5b2b354d703d47da60 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66101 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
5cc8c639cf62cd154cce4ac036a0f19ae2855056 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Fix off by one in ParseOneArg; this code is ugly but will be
replaced anyway.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66101 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
79d02158839dd73138e54caa30bd7b022c6ce1d3 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::dump and SeparateArg stubs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
f781c4192ee51a55c08ec53f054284ad1cdb2043 05-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Arg::dump and SeparateArg stubs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66100 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
36a43f8d678ae5fe291c7b95fa946ae4a34c0438 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::ParseOneArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
70a0dbbfbd933c80722549fef2d56de85c32d752 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add OptTable::ParseOneArg.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66090 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
12d474a91d360191f28134c96627213170f69f57 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::{append, getArgString}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
9358dc8d1edae6f9279647084e768c6da5715f73 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList::{append, getArgString}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66089 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
866fc41172773bfd04f688fcab5af85eafe187a5 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Arg implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
fb36caee244b9954caf9d4dda73608980e9c45b8 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Stub out Arg implementations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66088 91177308-0d34-0410-b5e6-96231b3b80d8
rg.cpp
0d96a83bcbb5a0f53c6ffb70dcac86c1cac0e781 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Option's need to know their ID.
- Also, add Input and Unknown opts to OptTable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
30b055f553ffa50ae5413ecf0f0ac8061c58f475 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Option's need to know their ID.
- Also, add Input and Unknown opts to OptTable.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66079 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
ec0f2fa749b5c1a2d681aed9f185d28fdba46734 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
0f9098e093089e935066729ea06bc86c23d9a432 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add Option flags.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66067 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
0119ee4ba9c6fd8f423afd506e9740c053a394a0 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak Option::accept interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66066 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
3c9cc6bfe933766a8b4177a3f69841b2344ec48a 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Tweak Option::accept interface.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66066 91177308-0d34-0410-b5e6-96231b3b80d8
ption.cpp
d6f0e37e654ace04dcefa70af2c12d0c302004d6 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sink Driver/Compilation into clang::driver namespace.
- Add OptTable instance to Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66063 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
1b3bb6efc59a21f794b534078f9ae7e95393f510 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Sink Driver/Compilation into clang::driver namespace.
- Add OptTable instance to Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66063 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
d77aac9273ca922a06aeabd1c6b431ec23bc9312 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
6ac1e2252b1a16fd8841c4b1af8fe41b820aa41d 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: Add ArgList implementation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66037 91177308-0d34-0410-b5e6-96231b3b80d8
rgList.cpp
a5aa4b0cb5b37f3afef3b1da4c394987c21c6598 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: More Option implementation.
- Add Options.def file, collects option information.

- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.

- cast<> support for Option, other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
2c6f6f3c170502c5b810102cf85f05732a2aa9d0 04-Mar-2009 Daniel Dunbar <daniel@zuster.org> Driver: More Option implementation.
- Add Options.def file, collects option information.

- Actual option instantiation is handled lazily by OptTable to allow
the driver to not need to instantiate all options.

- cast<> support for Option, other minor tweaks.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66028 91177308-0d34-0410-b5e6-96231b3b80d8
ptTable.cpp
ption.cpp
16090d46b3b9bd2fd97d7278f62755553c0ff9bd 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Sketch Driver Option classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65933 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ption.cpp
1eb4e64eed08837b85a375d6a953503daa844f07 03-Mar-2009 Daniel Dunbar <daniel@zuster.org> Sketch Driver Option classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65933 91177308-0d34-0410-b5e6-96231b3b80d8
river.cpp
ption.cpp
63c4da9ac2c5683bf6b6a12db8f4772a5748e4ae 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Stub out some structure for C++ driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65867 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
akefile
3ede8d0a7d1813f678ccc6011a99a0834b1b6116 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Stub out some structure for C++ driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65867 91177308-0d34-0410-b5e6-96231b3b80d8
ompilation.cpp
river.cpp
akefile
68952de6d75d9d1fad97e67eea6deeaeddd2cd6b 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
TMLDiagnostics.cpp
nitHeaderSearch.cpp
akefile
anagerRegistry.cpp
listDiagnostics.cpp
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
e1bd4e6d7c5b13462f83245865f7d9e9b6ea8486 02-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename lib/Driver (etc) to lib/Frontend in prep for the *actual*
driver taking lib/Driver.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65811 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
TMLDiagnostics.cpp
nitHeaderSearch.cpp
akefile
anagerRegistry.cpp
listDiagnostics.cpp
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
3bb3000049dd841d51cfad730bd056d1467f92f0 26-Feb-2009 Douglas Gregor <doug.gregor@gmail.com> Introduce code modification hints into the diagnostics system. When we
know how to recover from an error, we can attach a hint to the
diagnostic that states how to modify the code, which can be one of:

- Insert some new code (a text string) at a particular source
location
- Remove the code within a given range
- Replace the code within a given range with some new code (a text
string)

Right now, we use these hints to annotate diagnostic information. For
example, if one uses the '>>' in a template argument in C++98, as in
this code:

template<int I> class B { };
B<1000 >> 2> *b1;

we'll warn that the behavior will change in C++0x. The fix is to
insert parenthese, so we use code insertion annotations to illustrate
where the parentheses go:

test.cpp:10:10: warning: use of right-shift operator ('>>') in template
argument will require parentheses in C++0x
B<1000 >> 2> *b1;
^
( )


Use of these annotations is partially implemented for HTML
diagnostics, but it's not (yet) producing valid HTML, which may be
related to PR2386, so it has been #if 0'd out.

In this future, we could consider hooking this mechanism up to the
rewriter to actually try to fix these problems during compilation (or,
after a compilation whose only errors have fixes). For now, however, I
suggest that we use these code modification hints whenever we can, so
that we get better diagnostics now and will have better coverage when
we find better ways to use this information.

This also fixes PR3410 by placing the complaint about missing tokens
just after the previous token (rather than at the location of the next
token).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
4b2d3f7bcc4df31157df443af1b80bcaa9b58bba 26-Feb-2009 Douglas Gregor <dgregor@apple.com> Introduce code modification hints into the diagnostics system. When we
know how to recover from an error, we can attach a hint to the
diagnostic that states how to modify the code, which can be one of:

- Insert some new code (a text string) at a particular source
location
- Remove the code within a given range
- Replace the code within a given range with some new code (a text
string)

Right now, we use these hints to annotate diagnostic information. For
example, if one uses the '>>' in a template argument in C++98, as in
this code:

template<int I> class B { };
B<1000 >> 2> *b1;

we'll warn that the behavior will change in C++0x. The fix is to
insert parenthese, so we use code insertion annotations to illustrate
where the parentheses go:

test.cpp:10:10: warning: use of right-shift operator ('>>') in template
argument will require parentheses in C++0x
B<1000 >> 2> *b1;
^
( )


Use of these annotations is partially implemented for HTML
diagnostics, but it's not (yet) producing valid HTML, which may be
related to PR2386, so it has been #if 0'd out.

In this future, we could consider hooking this mechanism up to the
rewriter to actually try to fix these problems during compilation (or,
after a compilation whose only errors have fixes). For now, however, I
suggest that we use these code modification hints whenever we can, so
that we get better diagnostics now and will have better coverage when
we find better ways to use this information.

This also fixes PR3410 by placing the complaint about missing tokens
just after the previous token (rather than at the location of the next
token).




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65570 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
241ffd2316790817721c8b2ad01e657deec31dba 25-Feb-2009 Chris Lattner <sabre@nondot.org> add c++ search path for GCC 4.2, PR3668, patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65462 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
01e4b5c3bf9f529c0c873162119d56a4f9341167 25-Feb-2009 Chris Lattner <sabre@nondot.org> add c++ search path for GCC 4.2, PR3668, patch by Pawel Worach!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65462 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
3272e92d52342b3724bfdde0eddc7836f57d6b3c 20-Feb-2009 Chris Lattner <sabre@nondot.org> map source ranges through macro expansions. Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
~~~ ^ ~~~

(ranges!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65090 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
676f0242a86d7652de586cff360c07c4e752035b 20-Feb-2009 Chris Lattner <sabre@nondot.org> map source ranges through macro expansions. Before:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
^

(no ranges on the second diagnostics)

After:

t.m:5:2: error: invalid operands to binary expression ('typeof(P)' (aka 'struct mystruct') and 'typeof(F)' (aka 'float'))
MAX(P, F);
^~~~~~~~~
t.m:1:78: note: instantiated from:
#define MAX(A,B) ({ __typeof__(A) __a = (A); __typeof__(B) __b = (B); __a < __b ? __b : __a; })
~~~ ^ ~~~

(ranges!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65090 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
ec52b7d478efc5b1d55614c006c196ccbb1aa3b5 20-Feb-2009 Chris Lattner <sabre@nondot.org> refactor, pass ranges down instead of the whole
DiagnosticInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65088 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
ebbbb1b211119e13229c487dfc1713e8d1e77a41 20-Feb-2009 Chris Lattner <sabre@nondot.org> refactor, pass ranges down instead of the whole
DiagnosticInfo.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65088 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
99a72657754d99f74b5bdcc5c145ce4785d850ae 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h>
picks up the *system* limits.h file before clang's. This causes a failure
on linux and is definitely not what we want.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65026 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
6858dd3fcc2d3ac6a706a0294be1d3ac51849022 19-Feb-2009 Chris Lattner <sabre@nondot.org> fix a bug introduced in my previous patch: moving clang headers to the
"after" group instead of the system group makes it so #include <limits.h>
picks up the *system* limits.h file before clang's. This causes a failure
on linux and is definitely not what we want.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65026 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
54d2d61fc5443ba7e84611a5d7e7a9c77389510a 19-Feb-2009 Chris Lattner <sabre@nondot.org> PR3614: "ignoring nonexistent directory" should print the -isysroot
mapped path, not the requested path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65009 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
50b587d02f84ccf447d835fe8fcb79aad3a3e126 19-Feb-2009 Chris Lattner <sabre@nondot.org> PR3614: "ignoring nonexistent directory" should print the -isysroot
mapped path, not the requested path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65009 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
181616e82ddd5e255ff673181c529ddf36cf78ec 18-Feb-2009 Ted Kremenek <kremenek@apple.com> HTMLDiagnostics: Always display diagnostics *below* the line in question.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64959 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
3f0b6562486d91e2ebf729766e08ddf878c684e9 18-Feb-2009 Ted Kremenek <kremenek@apple.com> HTMLDiagnostics: Always display diagnostics *below* the line in question.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64959 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
459da5dfb230b77ad18b5903787aafdb23070529 18-Feb-2009 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64934 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
609b3ab97bdbdb46941c7ee5549269eb0a660412 18-Feb-2009 Chris Lattner <sabre@nondot.org> tidy up


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64934 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
364e9fc5eaacf08253d7d12b76e1fe9929c5bc4f 18-Feb-2009 Chris Lattner <sabre@nondot.org> stop searching GCC install directories for standard C headers (but
keep searching for C++ headers when in C++ mode). In theory clang
should be able to find all of its own headers now. If not, the
CPATH or C_INCLUDE_PATH environment variables can be specified to
add a include path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64862 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
6f541026b6dffc2801ed825d769e5fa0af95178d 18-Feb-2009 Chris Lattner <sabre@nondot.org> stop searching GCC install directories for standard C headers (but
keep searching for C++ headers when in C++ mode). In theory clang
should be able to find all of its own headers now. If not, the
CPATH or C_INCLUDE_PATH environment variables can be specified to
add a include path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64862 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
09aabe65109389b417b54de5cd2cf1f632140807 17-Feb-2009 Ben Laurie <benl@google.com> Handle fatal errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64770 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
64ea69f3b5ca564bfc6c8fbd267515a2ab7c3f24 17-Feb-2009 Ben Laurie <benl@google.com> Handle fatal errors.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64770 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
37f9ad298d8351f966548e8f8cd6ae75b396e7bf 17-Feb-2009 Chris Lattner <sabre@nondot.org> As an experimental hack, emit "instantiated from" information in
diagnostics. I'm not sure I want to keep this, but hey, it's easy
and could be useful or something, even if guarded by a
-fshow-me-tons-of-details option. A silly example is:

#define A B
#define C A
#define D C

int y = D;

We now emit:

t.c:11:9: error: use of undeclared identifier 'B'
int y = D;
^
t.c:9:11: note: instantiated from:
#define D C
^
t.c:8:11: note: instantiated from:
#define C A
^
t.c:7:11: note: instantiated from:
#define A B
^

A more useful example is from tgmath:

t.c:4:9: error: no matching function for call to '__tg_acos'
return acos(x);
^~~~~~~
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:51:17: note: instantiated from:
#define acos(x) __tg_acos(x)
^
... candidate set follows ...

This does not yet print ranges in instantiation info, (e.g. highlighting the
range "__tg_acos(x)" in the last example), but that could be added if we
decide this is a good idea :).

Thoughts and bug reports welcome!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64761 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
55dcef08676aa4d8d6777931c532d6df9571cf8d 17-Feb-2009 Chris Lattner <sabre@nondot.org> As an experimental hack, emit "instantiated from" information in
diagnostics. I'm not sure I want to keep this, but hey, it's easy
and could be useful or something, even if guarded by a
-fshow-me-tons-of-details option. A silly example is:

#define A B
#define C A
#define D C

int y = D;

We now emit:

t.c:11:9: error: use of undeclared identifier 'B'
int y = D;
^
t.c:9:11: note: instantiated from:
#define D C
^
t.c:8:11: note: instantiated from:
#define C A
^
t.c:7:11: note: instantiated from:
#define A B
^

A more useful example is from tgmath:

t.c:4:9: error: no matching function for call to '__tg_acos'
return acos(x);
^~~~~~~
/Users/sabre/llvm/Debug/Headers/tgmath-sofar.h:51:17: note: instantiated from:
#define acos(x) __tg_acos(x)
^
... candidate set follows ...

This does not yet print ranges in instantiation info, (e.g. highlighting the
range "__tg_acos(x)" in the last example), but that could be added if we
decide this is a good idea :).

Thoughts and bug reports welcome!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64761 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
3b29a1878b4536e757e2ca636fb59e296c23143c 17-Feb-2009 Chris Lattner <sabre@nondot.org> sink a call to getInstantiationLoc to eliminate an assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64755 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
49a48eb432862117aeb2ed137b8ac83da39352dd 17-Feb-2009 Chris Lattner <sabre@nondot.org> sink a call to getInstantiationLoc to eliminate an assertion.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64755 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
34e6c266ddc055960bc0fcf584fd8ae6e2205ca3 17-Feb-2009 Chris Lattner <sabre@nondot.org> break down EmitCaretDiagnostic to use more primitive calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64754 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
b88af81958b4438a04175ea46d3b4c109ad4625e 17-Feb-2009 Chris Lattner <sabre@nondot.org> break down EmitCaretDiagnostic to use more primitive calls.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64754 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
c1303fb99a7b48bc87e6647a27d9fbc924060c57 17-Feb-2009 Chris Lattner <sabre@nondot.org> split caret diagnostic printing out into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64751 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
94f55784145e7e3f1414b5368d715fa43ca3b273 17-Feb-2009 Chris Lattner <sabre@nondot.org> split caret diagnostic printing out into its own function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64751 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
f0b2856cc8d78adb9bd910db0fdc4b0a9d083b4e 17-Feb-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64750 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
8f7b396f497e25d462f38b9ad6ebd74acab38dde 17-Feb-2009 Chris Lattner <sabre@nondot.org> simplify some code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64750 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
e357b11167fa64fd195a7a35e966c5085f43b010 17-Feb-2009 Chris Lattner <sabre@nondot.org> If a source range comes through a function-like macro expansion,
highlight the arguments to the macro as well as the identifier.

Before:

t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are:
return acos(x);
^~~~

after:

t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are:
return acos(x);
^~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64743 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
34837a577186f5d05ff434841e19694c438b9ac3 17-Feb-2009 Chris Lattner <sabre@nondot.org> If a source range comes through a function-like macro expansion,
highlight the arguments to the macro as well as the identifier.

Before:

t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are:
return acos(x);
^~~~

after:

t.c:3:9: error: no matching function for call to '__tg_acos'; candidates are:
return acos(x);
^~~~~~~



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64743 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
3766df6e05ddb23707820f0e0feb0332a7f53e72 08-Feb-2009 Chris Lattner <sabre@nondot.org> use some references to simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64063 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
43eee07270bf1966ea7289310066aa670c4b647f 08-Feb-2009 Chris Lattner <sabre@nondot.org> use some references to simplify code.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64063 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
0e80d8ffd3492944facfd3389a8747d231fdaa78 08-Feb-2009 Chris Lattner <sabre@nondot.org> Genericize the existing logic for removing duplicate header dirs to apply
the "system dirs win over user dirs" logic to framework and headermap
search locations as well as normal directories. This means that
clang t.m -F/System/Library/Frameworks will treat /System/Library/Frameworks
as a system directory not a user directory. If you use -v, the difference is:

Before:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate framework "/System/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:

After:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate directory "/System/Library/Frameworks"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:

This fixes rdar://6566429.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64060 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
30f05b553db067c994966daca37e75324ee7b424 08-Feb-2009 Chris Lattner <sabre@nondot.org> Genericize the existing logic for removing duplicate header dirs to apply
the "system dirs win over user dirs" logic to framework and headermap
search locations as well as normal directories. This means that
clang t.m -F/System/Library/Frameworks will treat /System/Library/Frameworks
as a system directory not a user directory. If you use -v, the difference is:

Before:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate framework "/System/Library/Frameworks"
#include "..." search starts here:
#include <...> search starts here:

After:
ignoring nonexistent directory "/usr/libdata/gcc41"
ignoring duplicate directory "/System/Library/Frameworks"
as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:

This fixes rdar://6566429.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64060 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
95cb5507badb0f83665f9c18eece1f4b8bd33744 06-Feb-2009 Chris Lattner <sabre@nondot.org> handle fatal errors, rely on warnings to point out missing cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63913 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
41327585e4937bad8f9db485a506ea45223caeac 06-Feb-2009 Chris Lattner <sabre@nondot.org> handle fatal errors, rely on warnings to point out missing cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63913 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
8e3917f269a8ac66fed93e9e6d7f6291b9dc0a0f 05-Feb-2009 Edwin Török <edwintorok@gmail.com> Add Debian gcc 4.3 header search directories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63872 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
f7ea67a6ec577229753fc2833d64cd512de2ecfc 05-Feb-2009 Torok Edwin <edwintorok@gmail.com> Add Debian gcc 4.3 header search directories.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63872 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
2d89c564719b2f812cafbe0d4a39d914001ff21e 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
30fc933e5fbbb5f0ea60c47976d435254e378536 04-Feb-2009 Chris Lattner <sabre@nondot.org> lower the interface to getLineNumber like we did for
getColumnNumber. This fixes a FIXME in
SourceManager::getPresumedLoc because we now just decompose
the sloc once.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
e79fc8576f1d0937a6343ed438be9ed0cb0a88d6 04-Feb-2009 Chris Lattner <sabre@nondot.org> make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
7da5aea7669e6db3e593162b8a123aef06a04d07 04-Feb-2009 Chris Lattner <sabre@nondot.org> make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
extDiagnosticPrinter.cpp
8b57e2192c160809eafe6c93dfb20df819f5f30d 02-Feb-2009 Ted Kremenek <kremenek@apple.com> Clean up indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63551 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
d671c5a61605ab864768cbbb4feb9cd652609083 02-Feb-2009 Ted Kremenek <kremenek@apple.com> Clean up indentation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63551 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
68c1e19d20a9e0cc375f6d87f11e770a5fa216ee 30-Jan-2009 Chris Lattner <sabre@nondot.org> " Attached is a patch for TextDiagnosticPrinter that adds an optional
parameter that allows users to omit the printing of the source
location on a diagnostic. So basically it would omit the "abc.c:5:1: "
at the beginning of the line."

Patch by Alexei Svitkine!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63396 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
b8bf65e342d0872222f7ac10007d2837d7df437f 30-Jan-2009 Chris Lattner <sabre@nondot.org> " Attached is a patch for TextDiagnosticPrinter that adds an optional
parameter that allows users to omit the printing of the source
location on a diagnostic. So basically it would omit the "abc.c:5:1: "
at the beginning of the line."

Patch by Alexei Svitkine!




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63396 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
dd62ea6fc4d84ac05b792d77bd4fefa780d50c8a 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix TextDiagnosticPrinter::HandleDiagnostic to handle invalid FullSourceLocs that do not have a SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63230 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
05f3957c2033f500d9bcc919d4b37d40393c40cf 28-Jan-2009 Ted Kremenek <kremenek@apple.com> Fix TextDiagnosticPrinter::HandleDiagnostic to handle invalid FullSourceLocs that do not have a SourceManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63230 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
836774b81b2a48a2cde1e08abb1f5f5e0b21ae97 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
b9c3f966b103f7cfe8e5e60007c4c8b38f7298eb 27-Jan-2009 Chris Lattner <sabre@nondot.org> Introduce a new PresumedLoc class to represent the concept of a location
as reported to the user and as manipulated by #line. This is what __FILE__,
__INCLUDE_LEVEL__, diagnostics and other things should follow (but not
dependency generation!).

This patch also includes several cleanups along the way:

- SourceLocation now has a dump method, and several other places
that did similar things now use it.
- I cleaned up some code in AnalysisConsumer, but it should probably be
simplified further now that NamedDecl is better.
- TextDiagnosticPrinter is now simplified and cleaned up a bit.

This patch is a prerequisite for #line, but does not actually provide
any #line functionality.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63098 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
2c3258f28772cbdab116f947068fd3f34232de8f 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
a26ddabc0eb8cf8ea4de1878f84d3b920fc2349f 27-Jan-2009 Ted Kremenek <kremenek@apple.com> PathDiagnostics:
- Add the distinction between the 'bug type' and the 'bug description'

HTMLDiagnostics:
- Output the bug type field as HTML comments

scan-build:
- Use the bug type field instead of the bug description for the HTML table.
- Radar filing now automatically picks up the bug description in the title (addresses <rdar://problem/6265970>)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63084 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
dd485cb8aafa55b6bb90124512f1bea2c7ba46a8 23-Jan-2009 Ted Kremenek <kremenek@apple.com> When using -analyzer-output-plist always output a plist file even if it contains no error reports.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62871 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
c472d79e3aa3a81825f0e0c358dfd0317d6060ed 23-Jan-2009 Ted Kremenek <kremenek@apple.com> When using -analyzer-output-plist always output a plist file even if it contains no error reports.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62871 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
2f1dbf972239cacd388461ad3c673efb46a5de84 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer: When generating plists for errors reports, generate one plist file per translation unit that contains all of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62647 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
ddf32dabe71f00aa0943449f67201f587f0a04d6 21-Jan-2009 Ted Kremenek <kremenek@apple.com> Static Analyzer: When generating plists for errors reports, generate one plist file per translation unit that contains all of the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62647 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
1737bd5b2ae87c2fe2d50868c2158f7f91516cf4 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticPrinter.cpp
a11d61793341fea195c29a0dab3fbd74f2b39a8c 19-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceManager::getCanonicalFileID -> getFileID. There is
no longer such thing as a non-canonical FileID.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62499 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticPrinter.cpp
10aaf53ac6464331d773706c1c66f5cc00e44817 17-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62427 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
3b4d5e955e819dd3a4bed37ea2e47d6e4cb05274 17-Jan-2009 Chris Lattner <sabre@nondot.org> Rename SourceLocation::getFileID to getChunkID, because it returns
the chunk ID not the file ID. This exposes problems in
TextDiagnosticPrinter where it should have been using the canonical
file ID but wasn't. Fix these along the way.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62427 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
f4f776a489cfcf4fda9a8c6a16329c7a1f726561 17-Jan-2009 Chris Lattner <sabre@nondot.org> this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
2b2453a7d8fe732561795431f39ceb2b2a832d84 17-Jan-2009 Chris Lattner <sabre@nondot.org> this massive patch introduces a simple new abstraction: it makes
"FileID" a concept that is now enforced by the compiler's type checker
instead of yet-another-random-unsigned floating around.

This is an important distinction from the "FileID" currently tracked by
SourceLocation. *That* FileID may refer to the start of a file or to a
chunk within it. The new FileID *only* refers to the file (and its
#include stack and eventually #line data), it cannot refer to a chunk.

FileID is a completely opaque datatype to all clients, only SourceManager
is allowed to poke and prod it.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62407 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
a9bf63bb775d21abbc74e908b48dab32c00219b4 17-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
59ddeabc4c0aa2fdeef5a9183e8af69db07b5e74 17-Jan-2009 Chris Lattner <sabre@nondot.org> eliminate FullSourceLoc::getLocation() now that FullSourceLoc
*is* the location. This eliminates some weird X.getLocation().getLocation()'s.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62376 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
6bca88b965b3d7a96bb97a86d93d8fdefa1d90c2 16-Jan-2009 Chris Lattner <sabre@nondot.org> elimiante FullSourceLoc::getCanonicalFileID



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
4abb87ef149b98b5762eadaaf10c1ccf35dc7c41 16-Jan-2009 Chris Lattner <sabre@nondot.org> elimiante FullSourceLoc::getCanonicalFileID



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62374 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
b2545cb3891091710208703abc38866d19247473 16-Jan-2009 Chris Lattner <sabre@nondot.org> an instantiation loc is always a file loc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62370 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
f3e8fcd07468028cd40e754cc7fb01a5c5be39bc 16-Jan-2009 Chris Lattner <sabre@nondot.org> an instantiation loc is always a file loc.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62370 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
18c8dc0eedcdf7c81028c1e29d001fd331a99a4c 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticPrinter.cpp
f7cf85b330bedd2877e1371fb0a83e99751ae162 16-Jan-2009 Chris Lattner <sabre@nondot.org> more SourceLocation lexicon change: instead of referring to the
"logical" location, refer to the "instantiation" location.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62316 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
listDiagnostics.cpp
extDiagnosticPrinter.cpp
97324e6cdd5bc42e54de356bfe753ca282068f4f 25-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add Fedora 10 GCC paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61429 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
776caefc70360a00ee860f63d7f76288d5f41d87 25-Dec-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add Fedora 10 GCC paths.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61429 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
b3e058c3f16732d7f422e6fa11c10289a36fdc43 07-Dec-2008 Nuno Lopes <nunoplopes@sapo.pt> add missing gentoo c++ include paths

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60655 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
a3d783b11fc8a48ef9a024aaacba8caf43961de5 07-Dec-2008 Nuno Lopes <nunoplopes@sapo.pt> add missing gentoo c++ include paths

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60655 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
bc90373757805ae5853c0b5301cb7358698348d1 30-Nov-2008 Eli Friedman <eli.friedman@gmail.com> Minor update to CMake build system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60269 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
4310ff6d8b22ee223b88811ef9d51ebb0f9ea66b 30-Nov-2008 Eli Friedman <eli.friedman@gmail.com> Minor update to CMake build system.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60269 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
19c04e73d70ea941bfd1f306a85466fef222de05 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add license comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60144 91177308-0d34-0410-b5e6-96231b3b80d8
anagerRegistry.cpp
5abf03bbb9e8703d41bd241a4733d930791fd972 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add license comments.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60144 91177308-0d34-0410-b5e6-96231b3b80d8
anagerRegistry.cpp
0e77b7354cc5a62b1e17e250e6b246d4c8cd72e5 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for pluggable components of static analyzer.
- Creator function pointers are saved in ManagerRegistry.
- The Register* class is used to notify ManagerRegistry new module is
available.
- AnalysisManager queries ManagerRegistry for configurable module. Then it
passes them to GRExprEngine, in turn to GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60143 91177308-0d34-0410-b5e6-96231b3b80d8
anagerRegistry.cpp
22438a8dfe9f2f273c0b1a47f3f80be782ea6f09 27-Nov-2008 Zhongxing Xu <xuzhongxing@gmail.com> Add support for pluggable components of static analyzer.
- Creator function pointers are saved in ManagerRegistry.
- The Register* class is used to notify ManagerRegistry new module is
available.
- AnalysisManager queries ManagerRegistry for configurable module. Then it
passes them to GRExprEngine, in turn to GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60143 91177308-0d34-0410-b5e6-96231b3b80d8
anagerRegistry.cpp
fe3d0c80edd584573672a9756762dd651323a056 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59879 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
32b939b51b3cc5e4c4d61e31a59aa902de2525b8 22-Nov-2008 Chris Lattner <sabre@nondot.org> remove a dead enum


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59879 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
92a3353d3f7c2584cf85826021bcc583aff6ad86 19-Nov-2008 Chris Lattner <sabre@nondot.org> switch TextDiagnosticPrinter to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59597 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
a03a5b5a84989b1cbd3917b967e8fe64f99cfa80 19-Nov-2008 Chris Lattner <sabre@nondot.org> switch TextDiagnosticPrinter to raw_ostream.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59597 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
be8e5a477c5a51ff39a1c0cfec253b67bfb97ca4 19-Nov-2008 Chris Lattner <sabre@nondot.org> rewrite FormatDiagnostic to be less gross and a lot more efficient.
This also makes it illegal to have bare '%'s in diagnostics. If you
want a % in a diagnostic, use %%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59596 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
f4c839657742b823cea1a95b18422f1ba74d3ddd 19-Nov-2008 Chris Lattner <sabre@nondot.org> rewrite FormatDiagnostic to be less gross and a lot more efficient.
This also makes it illegal to have bare '%'s in diagnostics. If you
want a % in a diagnostic, use %%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59596 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
6948ae68efb71fc0ef50fbf240c3cc2ce8b97b2d 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
0a14eee528a901c16f0e288fbc10a3abc1660d87 18-Nov-2008 Chris Lattner <sabre@nondot.org> This reworks some of the Diagnostic interfaces a bit to change how diagnostics
are formed. In particular, a diagnostic with all its strings and ranges is now
packaged up and sent to DiagnosticClients as a DiagnosticInfo instead of as a
ton of random stuff. This has the benefit of simplifying the interface, making
it more extensible, and allowing us to do more checking for things like access
past the end of the various arrays passed in.

In addition to introducing DiagnosticInfo, this also substantially changes how
Diagnostic::Report works. Instead of being passed in all of the info required
to issue a diagnostic, Report now takes only the required info (a location and
ID) and returns a fresh DiagnosticInfo *by value*. The caller is then free to
stuff strings and ranges into the DiagnosticInfo with the << operator. When
the dtor runs on the DiagnosticInfo object (which should happen at the end of
the statement), the diagnostic is actually emitted with all of the accumulated
information. This is a somewhat tricky dance, but it means that the
accumulated DiagnosticInfo is allowed to keep pointers to other expression
temporaries without those pointers getting invalidated.

This is just the minimal change to get this stuff working, but this will allow
us to eliminate the zillions of variant "Diag" methods scattered throughout
(e.g.) sema. For example, instead of calling:

Diag(BuiltinLoc, diag::err_overload_no_match, typeNames,
SourceRange(BuiltinLoc, RParenLoc));

We will soon be able to just do:

Diag(BuiltinLoc, diag::err_overload_no_match)
<< typeNames << SourceRange(BuiltinLoc, RParenLoc));

This scales better to support arbitrary types being passed in (not just
strings) in a type-safe way. Go operator overloading?!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59502 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
b034e281af9d2cb52c2606764de229c1fb825307 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
2383b7f6aea2cb2bf2b5bfc0ec730f9354fecbbf 18-Nov-2008 Chris Lattner <sabre@nondot.org> Change the diagnostics interface to take an array of pointers to
strings instead of array of strings. This reduces string copying
in some not-very-important cases, but paves the way for future
improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59494 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
8fc9ba6fcf52993f49d92ef61f34506032b51aa8 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME that
the Backend output should be done in binary mode.
- I'd appreciate it if someone who has a Windows build could verify
this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59221 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
26fb272713809af97e6f58ca61b8b9dcba37afc7 13-Nov-2008 Daniel Dunbar <daniel@zuster.org> [LLVM up] Update for raw_fd_ostream change. This fixes a FIXME that
the Backend output should be done in binary mode.
- I'd appreciate it if someone who has a Windows build could verify
this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59221 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
9585fef6d5ebc75e1968b91eaf172e19859477fe 04-Nov-2008 Cédric Venet <cedric.venet@laposte.net> Update CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58716 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
e839b15d7d18c3f63ce0aea885d704ef663a05e9 04-Nov-2008 Cedric Venet <cedric.venet@laposte.net> Update CMakeLists.txt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58716 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
a3f825e5b6df7939120bfebee7411c5face4a7f9 04-Nov-2008 Ted Kremenek <kremenek@apple.com> Hook up the Plist diagnostic client to the driver.
Fix Plist output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58652 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
4fc82c84581476cb3adba8d4107ded22851d9c4d 04-Nov-2008 Ted Kremenek <kremenek@apple.com> Hook up the Plist diagnostic client to the driver.
Fix Plist output.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58652 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
0edabbfeb1cacf54a1b9be2f1cd777b0f2982902 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Add path diagnostics client for emitting path reports using Plists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58647 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
5d866256333fb6115a8a86ac4f89b2ca36e20c70 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Add path diagnostics client for emitting path reports using Plists.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58647 91177308-0d34-0410-b5e6-96231b3b80d8
listDiagnostics.cpp
21b88b772a9fdbc28aabcd081b0fa2bf59453786 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58646 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
ad99dbfc1d9178f9f5c415a81ad5bd39bd09d4b6 03-Nov-2008 Ted Kremenek <kremenek@apple.com> Rename 'HTMLDiagnostics.h' to 'PathDiagnosticClients.h'


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58646 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
b5878eb2057810feb454b3d4426149c1baac8328 02-Nov-2008 Ted Kremenek <kremenek@apple.com> Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58550 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
583e898efa890be581606f8162caac126d4a7106 02-Nov-2008 Ted Kremenek <kremenek@apple.com> Fixed a horrible bug in HTMLDiagnostics.cpp where bugs referencing source ranges that occur within macros would not be emitted at all.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58550 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
7a4864e85cd4f336dc2bd183fb058e44d304d628 27-Oct-2008 Chris Lattner <sabre@nondot.org> Rename Characteristic_t to CharacteristicKind



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58224 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
9d72851fec9e9c62570a027d42701562bbf29751 27-Oct-2008 Chris Lattner <sabre@nondot.org> Rename Characteristic_t to CharacteristicKind



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58224 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
c03d2ca68a37b5a33fffd5d1a30c28337bfce31f 26-Oct-2008 Oscar Fuentes <ofv@wanadoo.es> CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
d2f4e5ea6e980e48c292f5ca250e99377e3ee111 26-Oct-2008 Oscar Fuentes <ofv@wanadoo.es> CMake: Builds and installs clang binary and libs (no docs yet). It
must be under the `tools' subdirectory of the LLVM *source* tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58180 91177308-0d34-0410-b5e6-96231b3b80d8
MakeLists.txt
27f21263b3709531dff9463a8f8be4fe566460dd 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Expand bubble size by 50%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58111 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
f91ce7717958c879688150414f998cad23b7b84e 24-Oct-2008 Ted Kremenek <kremenek@apple.com> Expand bubble size by 50%.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58111 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
bb461503b115af248f3b13735d6936e0a436fdf0 24-Oct-2008 Douglas Gregor <doug.gregor@gmail.com> First non-embarrassing cut at checking for ambiguous derived-to-base
conversions.

Added PerformImplicitConversion, which follows an implicit conversion sequence
computed by TryCopyInitialization and actually performs the implicit
conversions, including the extra check for ambiguity mentioned above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
94b1dd2368dc9eeedf2794db654deae225fac763 24-Oct-2008 Douglas Gregor <dgregor@apple.com> First non-embarrassing cut at checking for ambiguous derived-to-base
conversions.

Added PerformImplicitConversion, which follows an implicit conversion sequence
computed by TryCopyInitialization and actually performs the implicit
conversions, including the extra check for ambiguity mentioned above.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58071 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
86744c5c44a52597debecd7cfe3bffca910680bb 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, CPATH="" does not add '.' to search path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57072 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
bb95255e08c5d56616f5581118f5babe2c4e6ea6 04-Oct-2008 Daniel Dunbar <daniel@zuster.org> Bug fix, CPATH="" does not add '.' to search path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57072 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
6f04406bb068bcb54f2bb80778f2f2a633579d53 26-Sep-2008 Chris Lattner <sabre@nondot.org> clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
0b9e736308af5397f558ffc8e780c438c2fdb563 26-Sep-2008 Chris Lattner <sabre@nondot.org> clean up a bunch of fixme's I added, by moving
DirectoryLookup::DirType into SourceManager.h


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56692 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
4668b57aa0b85d15098ba632b155bb33e757ea6e 26-Sep-2008 Chris Lattner <sabre@nondot.org> emulate a bit of GCC path lookup weirdness: if a system
directory is shadowed by a user directory in the lookup
path, ignore the user directory not the system one. Not
doing this can affect file lookup and the "is a system
header" bit on locations. For example:
clang -v -I/usr/include inc.c -E | & grep /usr/inc
now prints:

# 1 "/usr/include/i386/_types.h" 1 3 4
# 37 "/usr/include/i386/_types.h" 3 4
# 70 "/usr/include/i386/_types.h" 3 4

instead of:

# 1 "/usr/include/i386/_types.h" 1
# 37 "/usr/include/i386/_types.h"
# 70 "/usr/include/i386/_types.h"

This is part of rdar://6243860.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56669 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
7a739401983eb9bc25c9b4b25177e116f5e5ba92 26-Sep-2008 Chris Lattner <sabre@nondot.org> emulate a bit of GCC path lookup weirdness: if a system
directory is shadowed by a user directory in the lookup
path, ignore the user directory not the system one. Not
doing this can affect file lookup and the "is a system
header" bit on locations. For example:
clang -v -I/usr/include inc.c -E | & grep /usr/inc
now prints:

# 1 "/usr/include/i386/_types.h" 1 3 4
# 37 "/usr/include/i386/_types.h" 3 4
# 70 "/usr/include/i386/_types.h" 3 4

instead of:

# 1 "/usr/include/i386/_types.h" 1
# 37 "/usr/include/i386/_types.h"
# 70 "/usr/include/i386/_types.h"

This is part of rdar://6243860.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56669 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
bde1c82a558e819bb440ff7851e0ade0e9694ea4 22-Sep-2008 Ted Kremenek <kremenek@apple.com> Output "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56440 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
778246ae47ad0c881b55fa7a3d142d77ec7a3ae5 22-Sep-2008 Ted Kremenek <kremenek@apple.com> Output "REPORTHEADER" and "REPORTSUMMARYEXTRA" tags for use with scan-view.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56440 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
77892ac0609a2145a0dc8a15ec33f52a0b4fa021 21-Sep-2008 Ted Kremenek <kremenek@apple.com> Added experimental "intelligent-sizing" of HTML message bubbles based on the contents of the message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56400 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
a6aa83e5c7e0bc07af0e41308f8e39a5ecd54f83 21-Sep-2008 Ted Kremenek <kremenek@apple.com> Added experimental "intelligent-sizing" of HTML message bubbles based on the contents of the message.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56400 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
ab1323403f4d7daf3cdf3ede348e61d534146592 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56385 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
8c036c7f77d69f96df49219ed0bdbade200d52eb 20-Sep-2008 Ted Kremenek <kremenek@apple.com> Add "category" to BugTypes, allowing bugs to be grouped.
Changed casing of many bug names. The convention will be to have bug names (mostly) lower cased, and categories use some capitalization.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56385 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
7b6f67b456bad51f53c955700bb5067fdfb2da7a 13-Sep-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska!

"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
a95d3750441ac8ad03e36af8e6e74039c9a3109d 13-Sep-2008 Ted Kremenek <kremenek@apple.com> Patch by Csaba Hruska!

"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56185 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
6293fd1cf1a4e23cea635d8712c5a942e374f73a 11-Sep-2008 Douglas Gregor <doug.gregor@gmail.com> Add support for expected-note to Clang's -verify option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56089 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
233f74b29b2864d5984e13f3ae10a21404ef82e8 11-Sep-2008 Douglas Gregor <dgregor@apple.com> Add support for expected-note to Clang's -verify option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@56089 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
47a8145f2331c0d4c05013fb122a773379df8b21 05-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Set different header search paths for the Windows platform.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55832 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
121e3c207415fb4c105d690de384d8f3d49b0f2d 05-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Set different header search paths for the Windows platform.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55832 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
59bdb3e08cbcfa681cd03b9a2b177d77fba028a2 05-Sep-2008 Argiris Kirtzidis <akyrtzi@gmail.com> Add header search paths for Mingw32 (GCC version 4).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55830 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
bdbd4620b17304040290309e0899e3d7cc15943c 05-Sep-2008 Argyrios Kyrtzidis <akyrtzi@gmail.com> Add header search paths for Mingw32 (GCC version 4).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55830 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
e70794404ac74f1859dcbd3b11f0b80e1bd0b0a1 24-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Moved HTMLDiagnostics to lib/Driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
8148839c105992f00be9fd23f68f2139a9112ebf 24-Aug-2008 Zhongxing Xu <xuzhongxing@gmail.com> Moved HTMLDiagnostics to lib/Driver.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55274 91177308-0d34-0410-b5e6-96231b3b80d8
TMLDiagnostics.cpp
96c164672254ee7ee1df0351c2c015769851763d 23-Aug-2008 Chris Lattner <sabre@nondot.org> Add header search paths for dragonfly, patch by Sascha Wildner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55242 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
5654ffda8f44cb11e3380823a99f6556961bdc16 23-Aug-2008 Chris Lattner <sabre@nondot.org> Add header search paths for dragonfly, patch by Sascha Wildner!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55242 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
770e388f6c7d0614b13a663b7c6f996db14d7229 22-Aug-2008 Nico Weber <nicolasweber@gmx.de> Move most of HeaderSearch initialization to libDriver.

For example, adding the default system include paths in clients is now as
simple as

InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
0fca022d77b89100e746f4d659b84ed5b1ee0158 22-Aug-2008 Nico Weber <nicolasweber@gmx.de> Move most of HeaderSearch initialization to libDriver.

For example, adding the default system include paths in clients is now as
simple as

InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55174 91177308-0d34-0410-b5e6-96231b3b80d8
nitHeaderSearch.cpp
e0ad215b709fba79b3a1ead9af31a6f8bd3ee77a 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
acc5f3e42334525bf28c86471551f83dfce222d5 11-Aug-2008 Daniel Dunbar <daniel@zuster.org> More #include cleaning
- Kill unnecessary #includes in .cpp files. This is an automatic
sweep so some things removed are actually used, but happen to be
included by a previous header. I tried to get rid of the obvious
examples and this was the easiest way to trim the #includes in one
fell swoop.
- We now return to regularly scheduled development.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
d2a6ac9cd5cc5153ce9a4385a1f979714091fc71 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
extDiagnostics.cpp
7bfaaaecb3113f955db31e8d8a51acffd1bc0c27 10-Aug-2008 Nico Weber <nicolasweber@gmx.de> * Remove isInSystemHeader() from DiagClient, move it to SourceManager
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic

This fixes the following problems:

* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54620 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
extDiagnostics.cpp
f0a835cdaa9720d928a83465adfc789c9cc32eb7 09-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expressive diagnostics-- worth their weight in gold?
(Fixing a spelling error.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54591 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
aad6953ca1149d44cebadca8839745796bfd524e 09-Aug-2008 Gordon Henriksen <gordonhenriksen@mac.com> Expressive diagnostics-- worth their weight in gold?
(Fixing a spelling error.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54591 91177308-0d34-0410-b5e6-96231b3b80d8
extDiagnosticPrinter.cpp
0e13eaa4b7d1b0f5f6376683f3e4710f557d6a5d 06-Aug-2008 Nico Weber <nicolasweber@gmx.de> add a libDriver, for now only move the text diangostics stuff from Driver to there

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
extDiagnostics.cpp
fd54ebcaaf9a165846fdfafb32362238458e7f2d 06-Aug-2008 Nico Weber <nicolasweber@gmx.de> add a libDriver, for now only move the text diangostics stuff from Driver to there

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54383 91177308-0d34-0410-b5e6-96231b3b80d8
akefile
extDiagnosticBuffer.cpp
extDiagnosticPrinter.cpp
extDiagnostics.cpp