Commit Graph

170 Commits

Author SHA1 Message Date
Alex Lorenz 3bfe962afa Revert r300539 - Add #pragma clang attribute
Some tests fail on the Windows buildbots. I will have to investigate more.
This commit reverts r300539, r300540 and r300542.

llvm-svn: 300543
2017-04-18 10:46:41 +00:00
Alex Lorenz 0a849f47d2 Add #pragma clang attribute
The new '#pragma clang attribute' directive can be used to apply attributes to
multiple declarations. An attribute must satisfy the following conditions to
be supported by the pragma:
- It must have a subject list that's defined in the TableGen file.
- It must be documented.
- It must not be late parsed.
- It must have a GNU/C++11 spelling.

Differential Revision: https://reviews.llvm.org/D30009

llvm-svn: 300539
2017-04-18 09:41:47 +00:00
Serge Pavlov a693b907c7 Do not run tests for crash recovery if libstdc++ safe mode is enabled
If expensive checks are enabled, safe mode of libstdc++ is enabled too.
In this mode the library uses more complex data that allow additional
checks, for instance, a container may keep list of iterators that points
to it. If a code crashes it can leave these complex library objects in
inconsistent state. It occurs in a few tests that check error recovery
if compiler crashes. These test hang in expensive check mode, as the
library tries to synchronize access to the iterators pointing to some
container, but corresponding mutex remains locked after the crash.

This fix marks these tests as unsupported if clang is built with
libstdc++ safe mode enabled.

Differential Revision: https://reviews.llvm.org/D31126

llvm-svn: 300392
2017-04-15 05:53:49 +00:00
Dominic Chen 08f943c563 [analyzer] Add new Z3 constraint manager backend
Summary: Implement new Z3 constraint manager backend.

Reviewers: zaks.anna, dcoughlin, NoQ, xazax.hun

Subscribers: mgorny, cfe-commits

Differential Revision: https://reviews.llvm.org/D28952

llvm-svn: 299463
2017-04-04 19:52:25 +00:00
Pirama Arumuga Nainar b9d8062eda [Driver] Add flag to request arch-specific-subdir in -rpath
Summary:
This patch adds -f[no-]rtlib-add-rpath, which if enabled, embeds the
arch-specific subdirectory in resource directory using -rpath (instead
of doing so only during native compilation).

This patch also re-enables test arch-specific-libdir.c which was
silently unsupported because of the REQUIRES tag 'linux'.

Reviewers: bkramer, rnk, mgorny

Subscribers: srhines, cfe-commits

Differential Revision: https://reviews.llvm.org/D30700

llvm-svn: 297751
2017-03-14 16:58:07 +00:00
Pirama Arumuga Nainar 65a16dd858 Add arch-specific directory to search path
Summary:

This change adds an arch-specific subdirectory in <ResourceDir>/lib/<OS>
to the linker search path.  This path also gets added as '-rpath' for
native compilation if a runtime is linked in as a shared object.  This
allows arch-specific libraries to be installed alongside clang.

Reviewers: danalbert, cbergstrom, javed.absar

Subscribers: srhines

Differential Revision: https://reviews.llvm.org/D30015

llvm-svn: 296927
2017-03-03 23:20:49 +00:00
Dominic Chen 184c6242fa Reland 4: [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.

Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin

Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D30373

llvm-svn: 296895
2017-03-03 18:02:02 +00:00
Dominic Chen 09d66f7528 Revert "Reland 3: [analyzer] NFC: Update test infrastructure to support multiple constraint managers"
This reverts commit ea36f1406e1f36bf456c3f3929839b024128e468.

llvm-svn: 296841
2017-03-02 23:30:53 +00:00
Dominic Chen feaf9ff5ee Reland 3: [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.

Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin

Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D30373

llvm-svn: 296837
2017-03-02 23:05:45 +00:00
Dominic Chen 4a90bf8c3f Revert "Reland 2: [analyzer] NFC: Update test infrastructure to support multiple constraint managers"
This reverts commit f93343c099fff646a2314cc7f4925833708298b1.

llvm-svn: 296836
2017-03-02 22:58:06 +00:00
Dominic Chen 1cb0256a3c Reland 2: [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.

Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin

Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D30373

llvm-svn: 296835
2017-03-02 22:45:24 +00:00
Dominic Chen 00355a51d0 Revert "Reland: [analyzer] NFC: Update test infrastructure to support multiple constraint managers"
This reverts commit 1b28d0b10e1c8feccb971abb6ef7a18bee589830.

llvm-svn: 296422
2017-02-28 01:50:23 +00:00
Dominic Chen 59cd893320 Reland: [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.

Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin

Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D30373

llvm-svn: 296414
2017-02-28 00:02:36 +00:00
Dominic Chen 8589e10c30 Revert "[analyzer] NFC: Update test infrastructure to support multiple constraint managers"
This reverts commit 8e7780b9e59ddaad1800baf533058d2c064d4787.

llvm-svn: 296317
2017-02-27 03:29:25 +00:00
Dominic Chen 02064a3076 [analyzer] NFC: Update test infrastructure to support multiple constraint managers
Summary: Replace calls to %clang/%clang_cc1 with %clang_analyze_cc1 when invoking static analyzer, and perform runtime substitution to select the appropriate constraint manager, per D28952.

Reviewers: xazax.hun, NoQ, zaks.anna, dcoughlin

Subscribers: mgorny, rgov, mikhail.ramalho, a.sidorin, cfe-commits

Differential Revision: https://reviews.llvm.org/D30373

llvm-svn: 296312
2017-02-27 02:36:15 +00:00
Michal Gorny 638ac70a92 [test] Port clang tests to canonicalized booleans
Use the new llvm_canonicalize_cmake_booleans() function to canonicalize
booleans for lit tests. Replace the duplicate ENABLE_CLANG* variables
used to hold canonicalized values with in-place canonicalization. Use
implicit logic in Python code to avoid overrelying on exact 0/1 values.

Differential Revision: https://reviews.llvm.org/D28529

llvm-svn: 293052
2017-01-25 13:11:45 +00:00
Michal Gorny 61c3046408 [test] Correctly include build llvm_shlib_dir in stand-alone builds
Add the build llvm_shlib_dir into LD_LIBRARY_PATH before the directory
specified as llvm_libs_dir, in order to fix stand-alone builds
attempting to use installed clang libraries.

In case of stand-alone builds llvm_libs_dir specifies the location of
installed LLVM libraries which can also contain an older version
(previous build) of clang libraries. Therefore, ensure to specify
llvm_shlib_dir (which is always the build tree path) before
the potentially-system llvm_libs_dir.

Differential Revision: https://reviews.llvm.org/D26115

llvm-svn: 286952
2016-11-15 12:54:10 +00:00
Elad Cohen 938f516424 [Modules] Add a command line option for loading the clang builtins modulemap.
-fbuiltin-module-map loads the clang builtins modulemap file. (This is
equivalent to -fmodule-map-file=<resource dir>/include/module.modulemap)

Differential Revision: https://reviews.llvm.org/D25767

llvm-svn: 285548
2016-10-31 08:21:54 +00:00
Michal Gorny 7cfe480122 [Driver] Make -print-libgcc-file-name print compiler-rt lib when used
Make the -print-libgcc-file-name option print an appropriate compiler
runtime library, that is libgcc.a if gcc runtime is used
and an appropriate compiler-rt library if that runtime is used.

The main use for this is to allow linking executables built with
-nodefaultlibs (e.g. to avoid linking to the standard C++ library) to
the compiler runtime library, e.g. using:

  clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name)

in which case currently a program built like this linked to the gcc
runtime unconditionally. The patch fixes it to use compiler-rt libraries
instead when compiler-rt is the active runtime.

Differential Revision: https://reviews.llvm.org/D25338

llvm-svn: 283746
2016-10-10 12:23:40 +00:00
Jonas Hahnfeld fdaaca8ade XFAIL Driver/darwin-stdlib.cpp if CLANG_DEFAULT_CXX_STDLIB is set
Until someone rewrites the stdlib logic for Darwin so that we don't need
to pass down the -stdlib argument to cc1.
(see https://llvm.org/bugs/show_bug.cgi?id=30548)

Differential Revision: https://reviews.llvm.org/D24601

llvm-svn: 282701
2016-09-29 07:43:08 +00:00
Richard Smith bbcc9f0462 C++ Modules TS: add frontend support for building pcm files from module
interface files. At the moment, all declarations (and no macros) are exported,
and 'export' declarations are not supported yet.

llvm-svn: 279794
2016-08-26 00:14:38 +00:00
Reid Kleckner 12e64d953f Port some more debug info tests on Windows
llvm-svn: 274245
2016-06-30 17:41:27 +00:00
Pirama Arumuga Nainar aac7315e5b Add a RenderScript language type
Summary:
Add RenderScript language type and associate it with ".rs" extensions.
Test that the driver passes "-x renderscript" to the frontend for ".rs"
files.

(Also add '.rs' to the list of suffixes tested by lit).

Reviewers: rsmith

Subscribers: cfe-commits, srhines

Differential Revision: http://reviews.llvm.org/D21199

llvm-svn: 272317
2016-06-09 21:57:40 +00:00
David Blaikie 3612e4ff9d Enable some accidentally dead tests and fix up the bitrot
Problem found by Nico, originally committed by me in r213213. The .test
prefix wasn't actually being run. Once that was fixed the test cases had
outdated command line syntax and IR debug info format, so updated for
those issues to get them back up and running.

Thanks Nico!

llvm-svn: 271188
2016-05-29 19:50:23 +00:00
NAKAMURA Takumi ba7d0fe280 Revert r260266 (and r260276), "clang-cl: Enable plugins on Windows"
It doesn't work, at least, i686-win32.

llvm-svn: 260537
2016-02-11 16:43:08 +00:00
Ehsan Akhgari 48e8d8bcdd clang-cl: Enable plugins on Windows
llvm-svn: 260266
2016-02-09 19:43:13 +00:00
Richard Smith aada85c5f7 [modules] Compress files embedded into a .pcm file, to reduce the disk usage of -fembed-all-files mode.
llvm-svn: 259976
2016-02-06 02:06:43 +00:00
Yunzhong Gao 7cbc78e72b Adding a test for PR25717.
The test tries to produce a large preprocessed output to the console, and checks
that we do not see any unexpected fatal errors.

The test is not enabled unless a lit parameter "--param enable_console=1" is
passed on the command line to lit.py.

llvm-svn: 258902
2016-01-27 02:18:28 +00:00
NAKAMURA Takumi c86e9b79b8 Prune the feature "tls". No one is using it since TLS is enabled for Cygwin.
llvm-svn: 256457
2015-12-27 06:14:33 +00:00
NAKAMURA Takumi 79e40ec856 Revert r247977, "clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as "non-clang-driver"."
They, "tests requiring clang-driver", should work in trunk since ps4 driver has been introduced.

llvm-svn: 250866
2015-10-20 22:36:16 +00:00
NAKAMURA Takumi 430443ba61 Tweak to make clang/test/Driver/ps4-linker-win.c less sinsitive of DLL path.
- On mingw-w64, libstdc++-6.dll is used for clang.exe. The DLL might not be in Windows' system directory.
  - With --enable-shared, DLLs might be in ${CMAKE_BINARY_DIR}/bin.

I understand this test confirms that appropriate name of executable can be found on %PATH%.
Therefore I added "Output\\" before each expression.

FIXME: The output directory %T is hardcoded like "Output\\ps4-ld.exe".
llvm-svn: 250403
2015-10-15 13:51:13 +00:00
Richard Barton 1448fdc426 Silence warning about not being able to find clang-interpreter
This binary is only built with the examples project, so only require it then.

llvm-svn: 249538
2015-10-07 11:14:25 +00:00
NAKAMURA Takumi 36b6c39d48 clang/test/lit.cfg: *-ps4 doesn't have appropriate driver yet. Mark it as "non-clang-driver".
llvm-svn: 247977
2015-09-18 08:11:36 +00:00
Yaron Keren 640e7c99cc Enable clang tests requiring "clang-driver" on mingw.
At least on my mingw system they do pass, let's see what the bots think.

llvm-svn: 243224
2015-07-25 20:05:21 +00:00
Yaron Keren 47bfc19f29 Finally, with no users for shell-preserves-root, remove it from lit.cfg.
llvm-svn: 242329
2015-07-15 20:41:28 +00:00
NAKAMURA Takumi c5e50734e8 clang/test/lit.cfg: Introduce the feature "tls", for targeting cygwin.
Thread local storage is not implemented for targeting cygwin.

llvm-svn: 242115
2015-07-14 03:57:11 +00:00
Justin Bogner 4c4628c48c test: Set lit features appropriately when using asan and ubsan together
The asan/not_asan and ubsan/not_ubsan features weren't being set
correctly when LLVM_USE_SANITIZER is set to 'Address;Undefined'. Fix
this by doing substring instead of exact matching. Also simplify the
msan check for consistency.

llvm-svn: 240314
2015-06-22 18:47:10 +00:00
Pete Cooper 7dc8af5306 Check for backtraces in tests which are verifying pretty stack traces from a crashing clang.
PrettyStackTrace now requires the ENABLE_BACKTRACES option.  We need to check for that here or these tests fail llvm-lit.

Reviewed by chandlerc

llvm-svn: 228735
2015-02-10 19:53:38 +00:00
Filipe Cabecinhas 10ff1333e4 clang lit.cfg: Fix a bug pointed by Sean Silva
llvm-svn: 227894
2015-02-02 23:17:54 +00:00
Filipe Cabecinhas 18a72611f1 Special-case the PS4 SDK for a clang test
Original patch by Gao Yunzhong!

llvm-svn: 227593
2015-01-30 18:25:59 +00:00
Richard Smith 999500a26d Reorganize test/Modules:
* Put all input files under Inputs/, move corresponding tests into test/Modules.
 * Rename a modulemap test file to [...].modulemap, and teach lit that such files are tests.

llvm-svn: 226875
2015-01-22 23:07:47 +00:00
Francisco Lopes da Silva 24a777238e Add back a FIXME note to lit.cfg.
llvm-svn: 226703
2015-01-21 21:38:05 +00:00
Francisco Lopes da Silva 37e8f2d6a7 Fix lit for builds under /opt
llvm-svn: 225196
2015-01-05 19:59:24 +00:00
Yaron Keren f630971635 Teach lit.cfg to recognize -windows-gnu in addition to -mingw32.
llvm-svn: 224421
2014-12-17 09:55:15 +00:00
Rafael Espindola 234d3bce01 Remove local handling of ASAN_OPTIONS and UBSAN_OPTIONS.
They are now forwarded by TestingConfig.py.

llvm-svn: 221200
2014-11-03 23:09:25 +00:00
Filipe Cabecinhas aa363024a6 New round of fixes for "Always compile debuginfo-tests for the host triple"
clang tests were breaking, at least when compiling clang only, from an
installed llvm. Make the lit.cfg script deal with the case when we don't
have a host_triple available.

llvm-svn: 220148
2014-10-18 23:36:12 +00:00
Filipe Cabecinhas 0f5735965d Append the %itanium_abi_host_triple substitution unconditionally
We will fail if it's not set, even if we don't substitute.

llvm-svn: 220114
2014-10-18 00:05:26 +00:00
Filipe Cabecinhas 3514242a66 Appease the buildbots with the special case for non-set variables
llvm-svn: 219994
2014-10-16 23:54:26 +00:00
Filipe Cabecinhas e02eca7a42 Added %itanium_abi_host_triple to fix debuginfo-tests when clang is a cross-compiler by default
llvm-svn: 219989
2014-10-16 23:41:40 +00:00
Bob Wilson 43ec870a73 Remove support for the IOS_SIMULATOR_DEPLOYMENT_TARGET env var.
It turns out that this was never used. Instead we just use the
IPHONEOS_DEPLOYMENT_TARGET variable for both iOS devices and simulator.
rdar://problem/18596744

llvm-svn: 219467
2014-10-10 03:12:15 +00:00