Commit Graph

1526 Commits

Author SHA1 Message Date
Eric Fiselier 59174710d5 Add standard version to lit.cfg's available features
llvm-svn: 215885
2014-08-18 07:05:40 +00:00
Eric Fiselier 8f2a62ed6b Update linux test results
llvm-svn: 215884
2014-08-18 06:53:30 +00:00
Eric Fiselier 339bdc3be9 [libcxx] Add UNSUPPORTED tag to lit. It mirrors REQUIRES.
Summary:
This patch adds support for // UNSUPPORTED: feature. If an excluded feature is found in the list of available features then the test is marked unsupported.

I hope to use this to mark test unsupported if the fail with msan on asan. As well as tests that fail in particular standard modes.


Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215883
2014-08-18 06:43:06 +00:00
Eric Fiselier cd6ac3a3a7 [libcxx] Add list of currently known buildbots to libc++ homepage
Summary:
Instead of having to update test results for different platforms it would be helpful to just supply links to buildbots that build+test libcxx.
For the FreeBSD bots Pawel Worach gave me the OK to link to them.

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215882
2014-08-18 05:25:04 +00:00
Eric Fiselier 3faba8d464 Mark cuchar tests as always xfail since we don't provide the header'
llvm-svn: 215873
2014-08-18 05:09:51 +00:00
Eric Fiselier 0058c80cc7 [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
Summary:
This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. 

This patch does the following things:
1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it.
2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake.
3. Add config.llvm_use_sanitizer to lit.site.cfg.in
4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg.

Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. 

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215872
2014-08-18 05:03:46 +00:00
Eric Fiselier 1b44db22c6 [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormat
Summary:
This patch does two things:
CMake Update:
  - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x.
  - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default.
  - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y
  - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11.

Lit Update:
  - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std.
  - Remove mentions of has_cxx0X configuration option.
  - Check for `--param std=X' passed to lit on the command line.
  - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits

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

llvm-svn: 215802
2014-08-16 01:35:36 +00:00
Eric Fiselier 983484fb11 Readding FreeBSD support to lit.cfg. Patch from Pawel Worach.
Pawel has been using this patch on his buildbots for a while. This should
allow the testsuite to run on FreeBSD with libcxxrt.

llvm-svn: 215787
2014-08-15 23:24:00 +00:00
Jonathan Roelofs f11170406e Tame a few enum size tests when using -fshort-enums on ARM.
llvm-svn: 215769
2014-08-15 21:34:52 +00:00
Eric Fiselier db36dc23e4 Revert get testsuite running on FreeBSD.
There is a similar patch up for review. I'll submit my changes via that.

llvm-svn: 215750
2014-08-15 18:49:28 +00:00
Eric Fiselier 1a0b735340 Get testsuite running on FreeBSD.
Add initial support for using LIT to run the tests on FreeBSD. 
More work may need to be done to add support for FreeBSD but this is a
good initial step.

llvm-svn: 215742
2014-08-15 18:00:47 +00:00
Justin Bogner d2308ea5fd Revert "Turn off extern templates for most uses."
Turning off explicit template instantiation leads to a pretty
significant build time and code size cost. We're better off dealing
with ABI incompatibility issues that come up in a less heavy handed
way.

This reverts commit r189610.

llvm-svn: 215740
2014-08-15 17:58:56 +00:00
Eric Fiselier d237ac80f9 Fix incorrect locale requirements in tests
llvm-svn: 215694
2014-08-15 05:02:05 +00:00
Eric Fiselier e3981b8fac Add bare_allocator archetype that implements the minimal possible allocator interface.
llvm-svn: 215691
2014-08-15 04:15:41 +00:00
Hans Wennborg 4714826262 [libc++] Fix the CMake build on Mac when setting MACOSX_DEPLOYMENT_TARGET=10.6
The build file was trying to use LIBCXX_VERSION, which isn't set
anywhere, and also forgot to split the 'compile_flags' list.

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

llvm-svn: 215463
2014-08-12 17:32:07 +00:00
Eric Fiselier 90e0867742 Change two tests to be less dependant on locales.
This patch removes the use of the "%c" specifier for getting/setting times.
The semantics of this specifier differ between linux and Mac. I don't believe
the use of this specifier was important to the test.

The following tests now pass on linux.
test/input.output/iostream.format/ext.manip/get_time.pass.cpp
test/input.output/iostream.format/ext.manip/put_time.pass.cpp

llvm-svn: 215417
2014-08-12 00:48:56 +00:00
Eric Fiselier 981a64c380 Add return statement to slice_array and mask_array assignment. Closes PR20614.
This patch just adds the required return statements to slice_array::operator=
and mask_array::operator=.

Tests were added to check that the return value is the same as the object assigned
to.

llvm-svn: 215414
2014-08-12 00:06:58 +00:00
Dan Albert ec4de787e2 Update libc++ docs to include instructions for LIT.
Okay, so this actually does more than just that. I've rearranged most of
the information on the page to try to make it more helpful and flow
better.  Essentially, the differences between Mac and Linux, the various
ABI libraries, and in-tree versus out-of-tree builds were cluttering
things. To clean up, I've done the following:

 * Only describe the cmake process. buildit doesn't work out of the box
   on Linux, and we need to stop having duplicates for every process.
 * Use libc++abi for the default instructions. This works on the major
   platforms.
 * Describe both in-tree and out-of-tree builds. Previously it wasn't
   clear that in-tree builds were even possible for libc++.
 * Separate the documentation about using libc++ from that about
   building and testing libc++.

llvm-svn: 215358
2014-08-11 15:12:46 +00:00
Eric Fiselier c1bd9197eb NFC. Move definition of _LIBCPP_ASSERT into __debug header and remove external include guards.
Things done in this patch:

1. Make __debug include __config since it uses macros from it.

2. The current method of defining _LIBCPP_ASSERT is prone to redefinitions. Move
the null _LIBCPP_ASSERT definition into the __debug header to prevent this.

3. Remove external <__debug> include gaurds. <__debug> guards almost all of its
contents internally. There is no reason to be doing it externally.

This patch should not change any functionality.

llvm-svn: 215332
2014-08-10 23:53:08 +00:00
Eric Fiselier 399e99ae75 fix stdio.h test to reflect removal of ::gets in c++14
llvm-svn: 215329
2014-08-10 22:39:11 +00:00
Eric Fiselier 04c39ece80 NFC. Remove trailing whitespace and tabs.
llvm-svn: 215326
2014-08-10 20:56:31 +00:00
Dan Albert 502dca7bb0 Emulate clang atomic built-ins on gcc > 4.7
gcc 4.7 and above has atomic built-ins which slightly different APIs
from those provided by clang. Add proxy functions that wrap the gcc
built-ins to produce a symbol that is API equivalent to the clang
built-ins. This allows libc++'s atomic library to be used with gcc-4.7
and newer.

Patch contributed by Albert Wong.

llvm-svn: 215305
2014-08-09 23:51:51 +00:00
David Blaikie c6dbc22b9b Revert "Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state."
Premature commit due to misreading CR feedback.

This reverts commit r215301.

llvm-svn: 215302
2014-08-09 22:42:19 +00:00
David Blaikie f63d5fa236 Add some extra checks to the MoveOnly test class to ensure it is not constructed or assigned from in a moved-from state.
Some tests were constructing it with 0, so use -1 as the invalid state
instead.

Reviewers: Marshall Clow

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

llvm-svn: 215301
2014-08-09 22:35:47 +00:00
Eric Fiselier f5f5862a27 fix copy and pasted comment in test
llvm-svn: 215276
2014-08-09 02:43:16 +00:00
Eric Fiselier 95b0d0f888 Mark math.h and cmath tests as xfail on linux.
These tests were marked as failing because the libc implementation does not
use the proper return type on certain math functions. There is other weirdness
that prevents us from defining our own version of these functions.

The failing tests in cmake were separated into their own files so that the rest
failures in the rest of the cmath tests were not hidden.

This was not done for the math.h test since we don't actually supply math.h

llvm-svn: 215275
2014-08-09 02:39:03 +00:00
Marshall Clow 99d2df956d Apply a similar fix to <forward_list> as I did for <list> in r215210. Again, thanks to Ion Gaztañaga for noticing this problem w.r.t LWG#526
llvm-svn: 215213
2014-08-08 15:58:00 +00:00
Marshall Clow ced70066c2 While reading LWG#526, Ion Gaztañaga noticed that libc++ didn't correctly handle list::remove(const value_type &x), if x was an element of the list. Added a test for this, and a fix. Thanks to Ion for the report.
llvm-svn: 215210
2014-08-08 15:35:52 +00:00
Viktor Kutuzov 88d6dc962a Fix re-building in-tree libc++ against in-tree libc++abi
Differential Revision: http://reviews.llvm.org/D4805

llvm-svn: 215186
2014-08-08 06:53:30 +00:00
Marshall Clow 28d65da618 dit pointed out on IRC that '__i = _VSTD::next(__i)' was a very long-winded way of writing '++__i'. Since I hate being thought of as long-winded (this checkin comment notwithstanding), I fixed it. No functionality change.
llvm-svn: 214834
2014-08-05 01:34:12 +00:00
Dan Albert 48e28e09bb Fix typo.
llvm-svn: 214768
2014-08-04 20:27:45 +00:00
Marshall Clow 89872e99a5 Fix a problem with reference_wrapper in C++03 that was causing counting predicates to fail. Add a test to make sure it works. However, most of the reference_wrapper tests still fail in C++03 mode, due to a lack of decltype. No change there.
llvm-svn: 214760
2014-08-04 19:20:17 +00:00
Dan Albert a85b27f6f7 Add locales to available_features for tests.
Linux has a lot of failures caused by not having support for certain
locales. Since these come out as a lot of noise in the test results,
have lit.cfg detect the presence of the various locales used in the
tests and add them to config.available_features as locale.LOCALE_NAME.

This patch also adds REQUIRES: locale.REQUIRED_LOCALE to every test that
I saw failing in this manner. We probably need to add more for all the
tests requiring en_US.UTF-8, but we can do that on an as-needed basis.

One thing that concerns me is how many tests get skipped because of
missing locales (especially in regex/). We should make a point of
splitting up any tests that test default behavior _and_ behavior under a
given locale so that we aren't losing coverage for default behavior.

llvm-svn: 214753
2014-08-04 18:44:48 +00:00
Marshall Clow 90ba0533cd Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm
llvm-svn: 214736
2014-08-04 17:32:25 +00:00
Dan Albert b9dbbba6cb Obey LLVM_LIBDIR_SUFFIX.
llvm-svn: 214726
2014-08-04 16:13:32 +00:00
Eric Fiselier 58fab766e6 Adding ABI information to linux test results
llvm-svn: 214484
2014-08-01 06:30:18 +00:00
Eric Fiselier ae9acb8273 Update information about compiler used during linux tests and reformat run information.
llvm-svn: 214483
2014-08-01 06:27:40 +00:00
Eric Fiselier 9cd8ed4e23 Update linux test results file
llvm-svn: 214474
2014-08-01 01:59:09 +00:00
Eric Fiselier 993dfb1eef Change lit.cfg to allow whitespace before comments
llvm-svn: 214454
2014-07-31 22:56:52 +00:00
Dan Albert ea32c105a6 Make Android's ctype_base::mask unsigned.
Keeping the regex code sane is much easier if we match the other
platforms and use an unsigned mask.

llvm-svn: 214442
2014-07-31 21:04:08 +00:00
Eric Fiselier 6d3bd8f7ec [libcxx] Remove use of default function template parameters in type traits. Fixes DR20484
Summary: This patch moves the SFINAE for __is_destructor_welformed out of the function template parameters. type_traits must compile in c++03 mode since it is included in c++03 headers. 

Test Plan: No tests have been added.

Reviewers: danalbert, mclow.lists

Reviewed By: danalbert

Subscribers: K-ballo, cfe-commits

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

llvm-svn: 214422
2014-07-31 19:09:26 +00:00
Marshall Clow 2628dbb214 Add test cases for creating atomic types for trivially copyable types.
llvm-svn: 214406
2014-07-31 15:20:48 +00:00
Marshall Clow 6a577a819f Fix numeric_limits<XXX>::is_modulo for signed arithmetic types. We were reporting true, for all arithmetic types, which is incorrect. Fix the tests which were wrong, too. This fixes PR#20158.
llvm-svn: 214371
2014-07-31 01:18:05 +00:00
Marshall Clow 81f051cd10 std::once_flag was forward declared with _LIBCPP_TYPE_VIS decoration, and the defined with _LIBCPP_TYPE_VIS_ONLY decoration. Make them match
llvm-svn: 214219
2014-07-29 21:05:31 +00:00
Dan Albert 15c010a37e Base regex code on char_class_type.
__get_classname() and __bracket_expression were assuming that
char_class_type was ctype_base::mask rather than using
regex_traits<_CharT>::char_class_type.

This change allows char_class_type to be defined to something other than
ctype_base::mask so that the implementation will still work for
platforms with an 8-bit ctype mask (such as Android and OpenBSD).

llvm-svn: 214201
2014-07-29 19:23:39 +00:00
Alexey Samsonov 9d7323eca3 Fix linking with just-built libc++abi (added in r214037).
Pass target name ("cxxabi") to target_link_libraries(cxx ...) to ensure
that linker is able to locate just-built libc++abi in the build tree,
instead of relying on "-lc++abi" linker flag.

llvm-svn: 214114
2014-07-28 19:25:44 +00:00
Marshall Clow 51510e7f4c Fix PR#20471. Add a cast in __align_it to ensure that the bit twiddling is done at the correct size. A better solution, IMHO, would be to declare vector<bool>::__bits_per_word as 'size_type', rather than 'unsigned', but that's a possible ABI change.
llvm-svn: 214088
2014-07-28 15:02:42 +00:00
Dan Albert 55d029e6ae Better defaults for in-tree libc++ with cmake.
This will detect if you are building libcxx in-tree and libcxxabi is
available.  If so, it will default to using the in-tree libcxxabi by
setting LIBCXX_CXX_ABI to "libcxxabi", LIBCXX_LIBCXXABI_INCLUDE_PATHS to
"${CMAKE_SOURCE_DIR}/projects/libcxxabi/include" and will add "cxxabi"
as a proper dependency.

Patch by Russell Harmon.

llvm-svn: 214037
2014-07-26 23:08:33 +00:00
Eric Fiselier aa873af53d [libcxx] expose experimental::erased_type for all standard versions.
Summary: The polymorphic allocator implementation would greatly benefit by defining virtual functions in the dynlib instead of inline. In order to do that some types are going to have to be available outside of c++1y. This is the first step.

Reviewers: mclow.lists, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

llvm-svn: 213889
2014-07-24 19:17:38 +00:00
Eric Fiselier 567bb79bf2 D4451: Fix copy/move issues casude by __tuple_leafs's converting constructor
llvm-svn: 213888
2014-07-24 18:48:34 +00:00