Commit Graph

1539 Commits

Author SHA1 Message Date
Eric Fiselier
682132b4cc fix missing include for ::close in platform_support.h
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215998 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 17:52:40 +00:00
Eric Fiselier
bc4bcf051b Add extra test case for PR20345. Should have been commited with r215984
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215985 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 16:33:05 +00:00
Eric Fiselier
63648cffc0 Fix is_member_function_pointer does not account for ellipsis. PR20345. Patch from Agustin Berge.
I reviewed the patch and added the test cases.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215984 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 16:31:47 +00:00
Jonathan Roelofs
6f10d47bbc Give libcxx tests temporary filenames that are actually unique.
This fixes a race condition on temp file name creation.

http://reviews.llvm.org/D4962


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215977 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-19 13:56:56 +00:00
Eric Fiselier
6661ad10f2 Add standard version to lit.cfg's available features
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215885 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 07:05:40 +00:00
Eric Fiselier
978faa00df Update linux test results
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 06:53:30 +00:00
Eric Fiselier
da98ce033e [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215883 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 06:43:06 +00:00
Eric Fiselier
caf1c029cb [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215882 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 05:25:04 +00:00
Eric Fiselier
781448f48a Mark cuchar tests as always xfail since we don't provide the header'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215873 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 05:09:51 +00:00
Eric Fiselier
25a1516832 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215872 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-18 05:03:46 +00:00
Eric Fiselier
dfe5e72ed3 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215802 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-16 01:35:36 +00:00
Eric Fiselier
b4b32a02fa 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 23:24:00 +00:00
Jonathan Roelofs
09d8c46f30 Tame a few enum size tests when using -fshort-enums on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215769 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 21:34:52 +00:00
Eric Fiselier
efefe8ba34 Revert get testsuite running on FreeBSD.
There is a similar patch up for review. I'll submit my changes via that.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215750 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 18:49:28 +00:00
Eric Fiselier
101e2f3e06 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215742 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 18:00:47 +00:00
Justin Bogner
98c4e404ca 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215740 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 17:58:56 +00:00
Eric Fiselier
c808961618 Fix incorrect locale requirements in tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215694 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 05:02:05 +00:00
Eric Fiselier
31b9c44aa7 Add bare_allocator archetype that implements the minimal possible allocator interface.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215691 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15 04:15:41 +00:00
Hans Wennborg
f3b5f0e134 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215463 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-12 17:32:07 +00:00
Eric Fiselier
5b34a5f584 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215417 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-12 00:48:56 +00:00
Eric Fiselier
f4124610c2 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215414 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-12 00:06:58 +00:00
Dan Albert
35d775d0e4 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++.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215358 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-11 15:12:46 +00:00
Eric Fiselier
b9536101dc 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215332 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-10 23:53:08 +00:00
Eric Fiselier
e48b0c40ad fix stdio.h test to reflect removal of ::gets in c++14
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215329 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-10 22:39:11 +00:00
Eric Fiselier
67740670f9 NFC. Remove trailing whitespace and tabs.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215326 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-10 20:56:31 +00:00
Dan Albert
e8b4232e33 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215305 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 23:51:51 +00:00
David Blaikie
ddcbcd6b5e 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.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215302 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 22:42:19 +00:00
David Blaikie
5eb396a8e6 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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215301 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 22:35:47 +00:00
Eric Fiselier
ae39e4f795 fix copy and pasted comment in test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215276 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 02:43:16 +00:00
Eric Fiselier
2af66e9851 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


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215275 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-09 02:39:03 +00:00
Marshall Clow
095c3dd23e 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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215213 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-08 15:58:00 +00:00
Marshall Clow
fca038e133 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215210 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-08 15:35:52 +00:00
Viktor Kutuzov
f2e8c04540 Fix re-building in-tree libc++ against in-tree libc++abi
Differential Revision: http://reviews.llvm.org/D4805


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215186 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-08 06:53:30 +00:00
Marshall Clow
ea8ed833fe 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214834 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-05 01:34:12 +00:00
Dan Albert
c09c2865b9 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214768 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 20:27:45 +00:00
Marshall Clow
529d303340 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214760 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 19:20:17 +00:00
Dan Albert
b4ed5ca01e 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214753 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 18:44:48 +00:00
Marshall Clow
f0f1bca861 Fix PR#202520 - predicate called too many times in list::remove_if. Add tests for list, forward_list, and the std::remove_if algorithm
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214736 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 17:32:25 +00:00
Dan Albert
a1d32fcd0e Obey LLVM_LIBDIR_SUFFIX.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214726 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-04 16:13:32 +00:00
Eric Fiselier
32d4b65d56 Adding ABI information to linux test results
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214484 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 06:30:18 +00:00
Eric Fiselier
b127e600c4 Update information about compiler used during linux tests and reformat run information.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214483 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 06:27:40 +00:00
Eric Fiselier
c72b49ba0c Update linux test results file
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214474 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-01 01:59:09 +00:00
Eric Fiselier
d3d01eac01 Change lit.cfg to allow whitespace before comments
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214454 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 22:56:52 +00:00
Dan Albert
3ab406107d 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.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214442 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 21:04:08 +00:00
Eric Fiselier
6f8821df70 [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214422 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 19:09:26 +00:00
Marshall Clow
c5eb69601b Add test cases for creating atomic types for trivially copyable types.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214406 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 15:20:48 +00:00
Marshall Clow
15269a8796 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214371 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-31 01:18:05 +00:00
Marshall Clow
05d116eb87 std::once_flag was forward declared with _LIBCPP_TYPE_VIS decoration, and the defined with _LIBCPP_TYPE_VIS_ONLY decoration. Make them match
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214219 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-29 21:05:31 +00:00
Dan Albert
1757386944 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).


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214201 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-29 19:23:39 +00:00
Alexey Samsonov
e515bbda1b 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.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@214114 91177308-0d34-0410-b5e6-96231b3b80d8
2014-07-28 19:25:44 +00:00