Daniel Dunbar
bf11f79053
Driver: Factor out some code for handling the C++ standard library.
...
llvm-svn: 113890
2010-09-14 23:12:35 +00:00
Daniel Dunbar
30a12b8d88
Simplify.
...
llvm-svn: 113889
2010-09-14 23:12:31 +00:00
Anton Korobeynikov
82b3333b72
Disable cxa_atexit by default on MingW.
...
Patch by Dimitry Andric!
llvm-svn: 113683
2010-09-11 11:17:06 +00:00
Daniel Dunbar
ccbc45262b
Driver/Darwin: Make the compilation object available in AddLinkArgs.
...
llvm-svn: 113549
2010-09-09 21:51:05 +00:00
Daniel Dunbar
859dba6637
Driver: Mark function as nounwind when -mkernel or -fapple-kext is present.
...
llvm-svn: 113541
2010-09-09 21:17:44 +00:00
Daniel Dunbar
3d7e0e2c6b
Driver/Darwin: Catch another case where ld ends up using ld_classic.
...
llvm-svn: 113226
2010-09-07 17:50:41 +00:00
Daniel Dunbar
1eaf5c6abb
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.
llvm-svn: 113212
2010-09-07 17:07:49 +00:00
Rafael Espindola
b2d0d40c3d
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.
llvm-svn: 113138
2010-09-06 02:36:23 +00:00
Dawn Perchik
68bb1b441f
Add support for Borland extensions via option -fborland-extensions
...
(original patch r112791 was reverted due to a bug).
llvm-svn: 112915
2010-09-02 23:59:25 +00:00
Dawn Perchik
f0882f90f3
Reverting rev 112791 - apparently -fborland-extensions is on all the time?!
...
llvm-svn: 112797
2010-09-02 02:18:55 +00:00
Dawn Perchik
1fcc18c7bc
Add support for Borland extensions via option -fborland-extensions
...
llvm-svn: 112791
2010-09-02 01:12:01 +00:00
Daniel Dunbar
d435275c59
Frontend: Add basic -H support.
...
- I didn't implement the GCC "multiple include guard" detection parts, because
it doesn't seem useful or obvious.
llvm-svn: 111983
2010-08-24 22:44:13 +00:00
Daniel Dunbar
fe6c97b443
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.
llvm-svn: 111921
2010-08-24 16:47:49 +00:00
Daniel Dunbar
82eb4ce476
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.
llvm-svn: 111856
2010-08-23 22:35:37 +00:00
Michael J. Spencer
b186bc3c4b
Visual Studio tools used on win32 hosts when targeting win32.
...
llvm-svn: 111748
2010-08-21 21:55:07 +00:00
Douglas Gregor
eec975ce5a
Add machine-parseable Fix-It output as part of diagnostics, under the
...
flag -fdiagnostics-parseable-fixits, from Eelis van der Weegen!
llvm-svn: 111557
2010-08-19 20:24:43 +00:00
David Chisnall
589a494352
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.
...
llvm-svn: 111114
2010-08-15 22:58:12 +00:00
Argyrios Kyrtzidis
90bdfbbdf7
Switch on PCH for C++. C++ fans all over the world rejoice.
...
llvm-svn: 110879
2010-08-11 23:27:58 +00:00
Daniel Dunbar
cacb0e2d45
Driver/Darwin: Pass -demangle when linking, if the linker supports it.
...
llvm-svn: 110873
2010-08-11 23:07:50 +00:00
Daniel Dunbar
976a2f54fa
Driver: Add -mlinker-version=, which forwards to -target-linker-version.
...
llvm-svn: 110872
2010-08-11 23:07:47 +00:00
Ted Kremenek
0476899b20
Turn on idempotent operations checker when using --analyze.
...
llvm-svn: 110695
2010-08-10 18:03:13 +00:00
Rafael Espindola
92b0093112
Run the assembler instead of gcc on Linux.
...
llvm-svn: 110635
2010-08-10 00:25:48 +00:00
Eric Christopher
f387dbde81
Make -funroll-loops turn on loop unrolling in the optimizer instead
...
of just ignoring it.
llvm-svn: 110525
2010-08-07 23:08:14 +00:00
Daniel Dunbar
939c1211cc
Driver: Don't forward any -g options to GCC, when using it to drive the
...
assembler.
- Fixes PR6218, hopefully.
llvm-svn: 110111
2010-08-03 16:14:14 +00:00
Daniel Dunbar
7fbaf53470
Driver: Add Compilation::addCommand and switch tools to using it, now that we
...
don't have to deal with nested jobs.
llvm-svn: 110015
2010-08-02 02:38:28 +00:00
Daniel Dunbar
b440f56e53
Driver: Eliminate special InputInfo kind for pipes, it is now unused.
...
llvm-svn: 110013
2010-08-02 02:38:21 +00:00
Daniel Dunbar
ea3813fbc9
Driver/OpenBSD: Update toolchain for compiler changes / C++; patch by Jonathan
...
Gray.
llvm-svn: 109994
2010-08-01 23:13:54 +00:00
Daniel Dunbar
6d48476446
Driver/Darwin: Set -force_cpusubtype_ALL only by default on x86.
...
llvm-svn: 109074
2010-07-22 01:47:22 +00:00
Rafael Espindola
38360b3ff7
Add -lstdc++ to DragonFly tools.
...
Patch by Sascha Wildner.
llvm-svn: 108830
2010-07-20 12:59:03 +00:00
Daniel Dunbar
99b5524324
Driver: Make -fnext-runtime the default when rewriting Objective-C.
...
llvm-svn: 108741
2010-07-19 19:44:22 +00:00
Daniel Dunbar
b31b76f1eb
Driver: Fix a possible use after free.
...
llvm-svn: 108659
2010-07-18 21:16:15 +00:00
Daniel Dunbar
9765b9817d
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).
llvm-svn: 108346
2010-07-14 18:46:27 +00:00
Daniel Dunbar
9c3ed5f4d0
Driver: Remove some unused arguments.
...
llvm-svn: 108345
2010-07-14 18:46:23 +00:00
Daniel Dunbar
af68a88e68
Driver/Darwin: Pass -pie/-no_pie to the linker when -fpie/-fno-pie and friends
...
are explicitly given.
llvm-svn: 108297
2010-07-13 23:31:40 +00:00
Douglas Gregor
8ed0c0b99d
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.
llvm-svn: 107992
2010-07-09 17:35:33 +00:00
Chris Lattner
3e2ee147d0
add driver support for minix, patch by Kees van Reeuwijk
...
from PR7583
llvm-svn: 107788
2010-07-07 16:01:42 +00:00
Daniel Dunbar
bb7ac52e02
Driver/IRgen: Add support for -momit-leaf-frame-pointer.
...
llvm-svn: 107367
2010-07-01 01:31:45 +00:00
Rafael Espindola
0e1fb4f341
Set the default arch based on the triple.
...
llvm-svn: 107021
2010-06-28 17:18:09 +00:00
Rafael Espindola
b1ef8ffb15
Use softfp for linux gnueabi, keep the warning for everything else.
...
llvm-svn: 106984
2010-06-27 18:29:21 +00:00
Chris Lattner
51924e517b
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).
llvm-svn: 106956
2010-06-26 21:25:03 +00:00
Daniel Dunbar
a91c0ba88a
Driver: Remove some dead code left around after a refactoring. Found by the
...
Clang static analyzer!
llvm-svn: 106568
2010-06-22 20:18:18 +00:00
Chris Lattner
3c77a355e0
implement support for -finstrument-functions, patch by Nelson
...
Elhage!
llvm-svn: 106507
2010-06-22 00:03:40 +00:00
Rafael Espindola
23a8a06554
Change the test for which ABI/CC to use on ARM to be base on the environment
...
(the last argument of the triple).
llvm-svn: 106131
2010-06-16 19:01:17 +00:00
Douglas Gregor
0832963acd
Implement -fvisibility-inlines-hidden. <rdar://problem/7819834>
...
llvm-svn: 106003
2010-06-15 17:05:35 +00:00
Daniel Dunbar
3f1a1ffd95
Driver: Eliminate uses of Arg::getIndex.
...
Also, fix a memory leak.
llvm-svn: 105963
2010-06-14 21:23:08 +00:00
Daniel Dunbar
a442fd5da6
Driver: Fix arg_iterator typing to reflect that it is really an iterator over Arg*s.
...
llvm-svn: 105838
2010-06-11 22:00:13 +00:00
Jeffrey Yasskin
2b99c6fc4f
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.
llvm-svn: 105815
2010-06-11 05:57:47 +00:00
Jeffrey Yasskin
460aa54d0a
Implement -fcaret-diagnostics to undo -fno-caret-diagnostics.
...
llvm-svn: 105597
2010-06-08 04:56:20 +00:00
Daniel Dunbar
24e52992c0
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.
llvm-svn: 105584
2010-06-07 23:28:45 +00:00
Daniel Dunbar
7f3d95054b
Driver: Change -dwarf-debug-flags option to pass the original command line
...
arguments after translation, instead of the -cc1 level arguments.
llvm-svn: 105476
2010-06-04 18:47:06 +00:00