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

52 Коммитов

Автор SHA1 Сообщение Дата
Daniel Dunbar 38ac0637b5 Force driver triple.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68836 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 22:53:25 +00:00
Daniel Dunbar f36a06a958 Honor MACOSX_DEPLOYMENT_TARGET environment variable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68822 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-10 21:00:07 +00:00
Daniel Dunbar c21c485b4f 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
2009-04-08 23:54:23 +00:00
Daniel Dunbar 82d0068852 Driver: Fix forwarding of -fpascal-strings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68570 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 23:51:44 +00:00
Daniel Dunbar d573d26e1a 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
2009-04-07 22:13:21 +00:00
Daniel Dunbar 4ae24e7f11 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
2009-04-07 18:21:47 +00:00
Daniel Dunbar 0b46e1b538 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
2009-04-04 00:55:30 +00:00
Daniel Dunbar 0b5b0da158 Pull clang-cc code for generating PTH files based on the input type.
- <rdar://problem/6741594> [pth] don't abuse -x to drive pth
   generation

 - Simpler, and fixes PR3915.

Cleanup test cases for PTH:
 - Update to use -emit-pth

 - Removed PTH test of carbon.c and cocoa.mm; these didn't actually
   verify anything, and since PTH is token based the extra coverage
   (over cocoa.m) isn't particularly helpful.

 - Split PTH tests in cocoa.m to cocoa-pth.m, solely to increase
   available parallelism when running tests.

Ted, could you update the PTH test cases (include-pth.c and
cocoa-pth.m) to have some sort of positive check that the PTH is
getting used? "# of PTH cache hits" or "tokens read from PTH cache"
statistics would work great. :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68189 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-01 05:09:09 +00:00
Daniel Dunbar 8a8d8afa3d 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
2009-04-01 03:17:40 +00:00
Daniel Dunbar af07f936b6 (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
2009-03-31 17:35:15 +00:00
Daniel Dunbar 776dbd8b0e 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
2009-03-30 18:13:26 +00:00
Daniel Dunbar 0f6ec1b840 Missed test case update (part of previous commit)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68029 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-30 06:49:40 +00:00
Daniel Dunbar 9120f179fd 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
2009-03-29 22:27:40 +00:00
Daniel Dunbar ce341cbe89 Driver: Test case for darwin::Link
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67761 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-26 16:29:05 +00:00
Daniel Dunbar 02633b541b 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
2009-03-26 16:23:12 +00:00
Daniel Dunbar 4e7e9cff2e 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
2009-03-25 06:12:34 +00:00
Daniel Dunbar 337a6271b9 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
2009-03-24 20:17:30 +00:00
Daniel Dunbar 0f99d2e57d 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
2009-03-24 19:02:31 +00:00
Daniel Dunbar b3fd500a1c 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
2009-03-24 17:59:06 +00:00
Daniel Dunbar fe2e04a979 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
2009-03-24 17:31:30 +00:00
Daniel Dunbar 7ec3dafdda Rename clang-driver to clang.
Again, I tried to update cmake but it is untested.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67606 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 03:07:05 +00:00
Daniel Dunbar d7d5f0223b 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
2009-03-24 02:24:46 +00:00
Daniel Dunbar f94e215e4a Use not instead of ! in tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67601 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-24 01:59:55 +00:00
Eli Friedman 700b1339ae Fix a few more instances of "&>".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67496 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-23 00:04:01 +00:00
Daniel Dunbar b0c4df5c4d Driver: Implement 'missing argument' error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67490 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 23:26:43 +00:00
Eli Friedman 1ab10d45bf Don't use &> in tests; dash doesn't understand it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-22 21:49:20 +00:00
Daniel Dunbar e33bea4ef3 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
2009-03-20 23:39:23 +00:00
Daniel Dunbar 049853d74e Driver: Switch to using -include-pth.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67393 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-20 19:38:56 +00:00
Daniel Dunbar 8cac5f7e1c 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
2009-03-20 16:06:39 +00:00
Daniel Dunbar 5697aa0d75 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
2009-03-18 23:39:35 +00:00
Daniel Dunbar 622bfc8421 Add simple test case to make sure driver can generate executables.
- Hopefully Chris can pardon one executable test.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 22:49:41 +00:00
Daniel Dunbar ddf4d78458 Driver: Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67240 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-18 21:17:39 +00:00
Daniel Dunbar 5796bf4913 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
2009-03-18 02:00:31 +00:00
Daniel Dunbar ec29d3635b 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
2009-03-18 01:48:37 +00:00
Daniel Dunbar d46f0acef5 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
2009-03-18 00:12:31 +00:00
Daniel Dunbar 9d0703114a Driver: Add test case for various parts of binding (no-integrated-cpp,
-ccc-no-clang, -ccc-no-clang-cxx, -ccc-no-clang-cpp, -fsyntax-only).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67131 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:39:24 +00:00
Daniel Dunbar e247cbab4f Test had extra line which was masking actual failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67130 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:30:47 +00:00
Daniel Dunbar 1a172b80ce Driver: Add test for pipelining for analyzer and precompiler.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67129 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-17 23:26:35 +00:00
Daniel Dunbar baf07759bc 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
2009-03-17 21:29:52 +00:00
Daniel Dunbar 73bf6a987e Driver: Desensitize test to location of input.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66950 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 21:03:35 +00:00
Daniel Dunbar 83df91b63b Driver: Test pipelining for universal builds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66942 91177308-0d34-0410-b5e6-96231b3b80d8
2009-03-13 20:45:03 +00:00
Daniel Dunbar 83dd21f6b4 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
2009-03-13 17:57:10 +00:00
Daniel Dunbar e1bd4e6d7c 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
2009-03-02 06:16:29 +00:00
Chris Lattner 41df3f32ac just remove this insane testcase :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64087 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 19:44:51 +00:00
Sebastian Redl ddf7e994b5 Make the test cases failing due to exact diagnostic matching XFAIL.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64080 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-08 10:28:44 +00:00
Nuno Lopes c4b67edf3a avoid creating tmp files elsewhere
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63518 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-02 15:33:56 +00:00
Chris Lattner e86e4cd097 fix a crash I introduced, thanks to Ted for the awesome reduced
testcase :)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63182 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-28 05:42:38 +00:00
Chris Lattner a39f04857a Change -verify mode to find the "expected-error" and "expected-warning" strings
with a raw lexer instead of a PP lexer.  This means that -verify doesn't scan
#include'd headers for expected-error/warning strings, and it also means that it
doesn't ignore them in #if 0.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59774 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 01:18:36 +00:00
Daniel Dunbar 5186906067 Add -rewrite-macros test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57094 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05 01:39:04 +00:00
Daniel Dunbar b7219f8238 Desensitize env-include-paths.c to the directory it is running in.
- It would probably be better if TestRunner.sh canonicalized this.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57075 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-04 21:05:04 +00:00