Commit Graph

1061 Commits

Author SHA1 Message Date
Alp Toker b504417b03 Move remaining %clang_cc1 tests out of test/Driver
clang -cc1 skips the driver so it never made sense to include these with the
Driver tests.

Basic type tests and flag tests generally both go in Frontend.

Now that the final -cc1 tests have been moved out of test/Driver, add a
local substitution to enforce and detect future mistakes.

These miscategorized tests were probably the source of confusion in r194817.

llvm-svn: 194919
2013-11-16 06:20:17 +00:00
Jim Grosbach 82eee26877 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.

llvm-svn: 194907
2013-11-16 00:53:35 +00:00
Alp Toker 7874bdc6c1 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.

llvm-svn: 194845
2013-11-15 20:40:58 +00:00
Hans Wennborg 444c37da85 clang-cl: Make the driver parse all(?) msvc flags
Even if we don't support a flag, we should be able to parse it
to provide a better error message than the current default
"error: no such file or directory: '/foo'" (which we should probably
also tweak, btw).

This also tries to clean up the test file a bit.

llvm-svn: 194837
2013-11-15 18:29:58 +00:00
Alexander Potapenko 4fe1301bea [ASan] Fix darwin-sanitizer-ld.c for iossim, which seems to use -lc++ instead of -lstdc++.
llvm-svn: 194822
2013-11-15 16:57:57 +00:00
Alexander Potapenko 868cca96c4 [ASan] Link with libclang_rt.asan_iossim_dynamic.dylib when targeting the iOS simulator.
Add a test.

llvm-svn: 194820
2013-11-15 16:07:44 +00:00
Sylvestre Ledru 6ae3980118 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

llvm-svn: 194817
2013-11-15 15:39:14 +00:00
Alp Toker 9c5ae47c94 Ignore test Inputs globally and remove redundant lit.local.cfg files
By adding a default config.excludes pattern we can avoid individual
suppressions in subdirectories.

This matches LLVM's lit.cfg which also excludes a few other common non-test
filenames for consistency.

llvm-svn: 194814
2013-11-15 13:37:49 +00:00
Tom Stellard 5558304ba2 R600: Add processor type for Hawaii
llvm-svn: 194751
2013-11-14 23:45:53 +00:00
David Peixotto dfb661434d 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.

llvm-svn: 194743
2013-11-14 22:52:58 +00:00
Weiming Zhao 2005b4816a Add test case for r194593
llvm-svn: 194606
2013-11-13 21:40:17 +00:00
Diego Novillo 5c29705c13 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.

llvm-svn: 194567
2013-11-13 12:22:39 +00:00
Hans Wennborg df01974817 clang-cl: parse the /Yc flag (PR17895)
llvm-svn: 194523
2013-11-12 22:35:26 +00:00
Fariborz Jahanian ff6c97c0d2 ObjectiveC. availability of Array/Dictionary subscripting
is further restricted in legacy runtime to deployment target
of 10.7 and later. // rdar://15363492

llvm-svn: 194507
2013-11-12 20:50:26 +00:00
Hans Wennborg 63d18acc7f clang-cl: parse the /GT option
llvm-svn: 194502
2013-11-12 19:21:50 +00:00
Fariborz Jahanian fd4ce193ba ObjectiveC driver change. re-apply patch reverted in
r194450 with a modified test. // rdar://15363492

llvm-svn: 194489
2013-11-12 17:08:46 +00:00
Robert Lytton 6b1deb4cf9 XCore target has -fno-use-cxa-atexit as default.
llvm-svn: 194460
2013-11-12 10:09:22 +00:00
Rafael Espindola b44676c221 This reverts commit r194435 and r194434.
Trying to get the bots green.

llvm-svn: 194450
2013-11-12 04:33:56 +00:00
Fariborz Jahanian 04bf672537 ObjectiveC. Try to unbreak buildbot.
llvm-svn: 194435
2013-11-12 00:08:23 +00:00
Fariborz Jahanian 1236485573 ObjectiveC. By default allow array/dictionary subscripting in
ObjectiveC legacy runtime too. // rdar://15363492

llvm-svn: 194434
2013-11-11 23:44:52 +00:00
Sylvestre Ledru e293b1a8d8 Revert "Using an invalid -O falls back on -O3 instead of an error"
This reverts commit r194403.

Was breaking too many tests...

llvm-svn: 194420
2013-11-11 20:51:44 +00:00
Sylvestre Ledru cc645758c7 Revert "Remove -### from the -O20 test, it was failing the test (?)"
This reverts commit r194414.

Was breaking too many tests...

llvm-svn: 194419
2013-11-11 20:46:40 +00:00
Sylvestre Ledru 313e730eef Remove -### from the -O20 test, it was failing the test (?)
llvm-svn: 194414
2013-11-11 19:54:40 +00:00
Sylvestre Ledru 26386be183 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

llvm-svn: 194403
2013-11-11 19:01:05 +00:00
Roman Divacky 612c916f0d Add test for r194350.
llvm-svn: 194396
2013-11-11 18:24:28 +00:00
Rafael Espindola 236db46f79 This reverts commit r194330, r194329 and r194328.
The test was still failing on OS X and mingw.

llvm-svn: 194334
2013-11-09 20:07:19 +00:00
David Chisnall a1f49c7f37 FreeBSD 10 ships with only libc++, make sure it's the default when compiling
c++ code.

llvm-svn: 194332
2013-11-09 15:03:56 +00:00
David Chisnall 10737e80b0 Correctly set the target in fuse_ld.c correctly...
llvm-svn: 194330
2013-11-09 14:43:08 +00:00
David Chisnall 0259a2933c Add explicit target to the fuse_ld.c test.
llvm-svn: 194329
2013-11-09 14:35:29 +00:00
David Chisnall e6dcfaf127 Add support for -fuse-ld=.
llvm-svn: 194328
2013-11-09 14:16:52 +00:00
Rafael Espindola 0df9e16cc7 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.

llvm-svn: 194097
2013-11-05 21:43:54 +00:00
Peter Collingbourne 3270164f39 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

llvm-svn: 193875
2013-11-01 18:16:25 +00:00
Amara Emerson b4b0cc0756 AArch64: Fix wildcard matching on CHECK lines. Now recognises arch64--.
llvm-svn: 193858
2013-11-01 12:53:57 +00:00
Amara Emerson 703da2ea98 [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.

llvm-svn: 193740
2013-10-31 09:32:33 +00:00
Hans Wennborg 31c51ccace clang-cl: Parse the /arch, /Yu and /Fp options (PR17736)
We don't support these options, but should at least parse them.

llvm-svn: 193702
2013-10-30 17:36:27 +00:00
Rafael Espindola 8c8711207c Add support for the separate version of /FI.
Patch by Jeff Muizelaar.

llvm-svn: 193642
2013-10-29 19:42:01 +00:00
Tom Stellard 08ded12ffb R600: Add Sea Islands GPUs
llvm-svn: 193622
2013-10-29 16:38:29 +00:00
Chandler Carruth da797048d9 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.

llvm-svn: 193601
2013-10-29 10:27:30 +00:00
Bernard Ogden 18b5701a68 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

llvm-svn: 193600
2013-10-29 09:47:51 +00:00
Rafael Espindola a839855b56 Revert "Support cross linking to arm on ubuntu."
This reverts commit r193528 (and fixes).

It broke Chandler's setup.

llvm-svn: 193554
2013-10-28 23:14:34 +00:00
Rafael Espindola 2b5e65d95b More windows path handling.
llvm-svn: 193533
2013-10-28 19:40:25 +00:00
Rafael Espindola c6329b283e Relax test to pass with windows paths.
llvm-svn: 193532
2013-10-28 19:19:29 +00:00
Rafael Espindola cdd2c0044d 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.

llvm-svn: 193528
2013-10-28 18:52:30 +00:00
Rafael Espindola 28d9b5ac1e Fix option typo.
llvm-svn: 193504
2013-10-27 14:46:16 +00:00
Rafael Espindola 59cc2f3fc2 Fix option spelling.
llvm-svn: 193503
2013-10-27 14:11:19 +00:00
Rafael Espindola fc2bacea3d Use -target instead of triple and use FileCheck.
llvm-svn: 193502
2013-10-27 13:59:51 +00:00
Rafael Espindola 0794a915a4 Don't check for -L options that gcc doesn't use.
GCC on fedora 18 ARM only uses 2 -L options. Clang prints two extra ones, but
we should not include them in the test as they are not required.

llvm-svn: 193430
2013-10-25 19:44:29 +00:00
Bernard Ogden da13af380a 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
llvm-svn: 193367
2013-10-24 18:32:51 +00:00
Bernard Ogden a58ef057b9 Set appropriate FPU default for Linux on v8
Change-Id: If9b649c92e7196e3e791948545dc80901a0761eb
llvm-svn: 193365
2013-10-24 18:32:41 +00:00
Bernard Ogden 021d7dacd0 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
llvm-svn: 193364
2013-10-24 18:32:36 +00:00