Commit Graph

2372 Commits

Author SHA1 Message Date
Marshall Clow 8d113d430f Add a bunch of missing includes in the test suite to make it more portable. Fixes bugs #26120 and #26121. Thanks to Jonathan Wakely for the reports and the patches.
llvm-svn: 257474
2016-01-12 14:51:04 +00:00
Marshall Clow 7087a51b13 Put the definition of _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK in the right place.
llvm-svn: 257422
2016-01-12 00:38:04 +00:00
Marshall Clow ec880422df Preemptively disable unsigned integer sanitization in 32 and 64 bit versions of __murmur2_or_cityhash. This lets people use the unsigned integer overflow checker in UBSAN w/o getting hits from libc++'s hash code (where the unsigned integer overflow is legal and deliberate)> Patch by @danielaustin. Reviewed as: http://reviews.llvm.org/D15973
llvm-svn: 257368
2016-01-11 19:27:10 +00:00
Evgeniy Stepanov c86b392078 Revert "Remove visibility attributes from out-of-class method definitions in iostreams."
llvm-svn: 257193
2016-01-08 19:21:02 +00:00
Ahmed Bougacha 812d65a26a [libcxx] Set LC_ALL rather than LC_COLLATE to override collation.
r251131 replaced LANG with LC_COLLATE. But LC_ALL has precedence
over both, so the test still fails when LC_ALL=C.

llvm-svn: 257018
2016-01-07 02:36:09 +00:00
Marshall Clow 652a2ce191 Add explicit include directives; the file was getting implicitly included already. NFC
llvm-svn: 256864
2016-01-05 19:53:31 +00:00
Marshall Clow fd495892d6 Remove some test scaffolding that I added and then didn't need. No functional change
llvm-svn: 256861
2016-01-05 19:44:58 +00:00
Marshall Clow afc9ff99ec First half of LWG#2354: 'Unnecessary copying when inserting into maps with braced-init syntax'
llvm-svn: 256859
2016-01-05 19:32:41 +00:00
Ahmed Bougacha 4d315f1300 [libcxx] Fix typo in darwin target_info.py introduced by r256621.
llvm-svn: 256772
2016-01-04 19:35:40 +00:00
Eric Fiselier 67ac709e4c Print stacktrace with UBSAN
llvm-svn: 256729
2016-01-04 03:54:58 +00:00
Eric Fiselier 5243e190a7 Remove unsafe "__as_link()" cast member function.
"__as_link()" can only be used safely on "__list_node" objects. This patch
moves the "__as_link()" member function from "__list_node_base" to "__list_node"
so it cannot be used incorrectly.

Unsafe downcasts now use a non-member function so we don't defer the type-punned
pointer.

llvm-svn: 256727
2016-01-04 03:27:52 +00:00
Eric Fiselier 934b092186 Use __rebind_pointer to avoid #ifdef block
llvm-svn: 256654
2015-12-30 21:52:00 +00:00
Eric Fiselier b88ea354fe [libcxx] Fix for ALL undefined behavior in <list>.
Summary:
This patch fixes std::list for builtin pointer types in the current ABI version and fixes std::list for all fancy pointer types in the next ABI version. The patch was designed to minimize the amount of code needed to support both ABI configurations. Currently only ~5 lines of code differ.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: dexonsmith, awi, cfe-commits

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

llvm-svn: 256652
2015-12-30 20:57:59 +00:00
Eric Fiselier d57bcda1cb Fix locale feature testing in test suite.
llvm-svn: 256621
2015-12-30 04:45:42 +00:00
Eric Fiselier d888cf50c6 Revert r256606 due to compiler-rt sanitizer bot failures
llvm-svn: 256614
2015-12-30 03:39:03 +00:00
Eric Fiselier bb60f19584 Cleanup CMake for out-of-tree builds
llvm-svn: 256606
2015-12-30 01:02:38 +00:00
Eric Fiselier 7481ac43a5 Fix test failure in 32 bit mode
llvm-svn: 256598
2015-12-29 23:19:00 +00:00
Eric Fiselier ad41a2f480 Mark LWG defect #2367 as complete
llvm-svn: 256597
2015-12-29 23:18:27 +00:00
Ben Craig d38f60270c [libcxx] Fixing the Mac / Darwin build
llvm-svn: 256594
2015-12-29 23:01:07 +00:00
Ben Craig 8de2f0cf01 [libcxx] Fixing silly mistake from last commit.
Tested on Linux x86_64 targeting Linux x86_64.

llvm-svn: 256592
2015-12-29 22:55:55 +00:00
Ben Craig e238372258 [libcxx] Fixing the Linux sanitizer builds
llvm-svn: 256591
2015-12-29 22:43:17 +00:00
Ben Craig 90bee6354d [libcxx] Refactoring target_info.py
This patch makes it easier to support running the lit tests for new and
unusual platforms. It will break existing users that set
LIBCXX_TARGET_INFO to anything other than the default. I think this is
fine, because the old LIBCXX_TARGET_INFO wasn't terribly useful.

The old way of supporting the different test platforms was to have
conditional code scattered throughout config.py. New platforms would need
to add conditionals there. Alternatively, the new platform could set
no_default_flags to true, and reconstitue almost the entire compile and
link line, including things that don't vary across platforms.

The new way of supporting new platforms is to create a new target info
class, and have make_target_info return an instance of it. For platforms
supported in-tree, that will be done by modifying make_target_info. For
out-of-tree platforms, users can set LIBCXX_TARGET_INFO at cmake configure
time.

The target info sub-classes can provide fine-grained information back to
config.py. The hooks that will most commonly be provided will be
add_cxx_compile_flags and add_cxx_link_flags. These hooks can provide the
platform specific flags, while letting config.py handle all the invariant
flags.

Target info hooks were added for each area that the existing config.py had
platform specific behavior. config.py is now mostly free of platform
specific conditionals.

This patch was tested on Linux x86_64. I both targeted Linux x86_64, and
an out-of-tree platform with a custom target_info. In both cases I was
able to run libcxx and libcxxabi tests. I do not have access to FreeBSD,
Darwin, or Windows machines that are set up for lit testing.

llvm-svn: 256588
2015-12-29 22:21:38 +00:00
Eric Fiselier 7a608aa232 [libcxx] Fix LWG Issue #2367 - Fixing std::tuple and std::pair's default constructors.
Summary: This patch implements the solution for LWG Issue #2367. See http://cplusplus.github.io/LWG/lwg-active.html#2367

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

llvm-svn: 256325
2015-12-23 08:20:26 +00:00
Eric Fiselier 51b9de4c7c Fix type in tuple test. Sorry for the noise
llvm-svn: 255944
2015-12-18 01:04:36 +00:00
Eric Fiselier 545b8861fc [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from K-Ballo.
Review: http://reviews.llvm.org/D14839
llvm-svn: 255941
2015-12-18 00:36:55 +00:00
Eric Fiselier 6627c70df7 Add CMake option LIBCXX_CONFIGURE_IDE to allow for other IDE's.
CLion needs similar configuration changes as MSVC_IDE and XCODE.

llvm-svn: 255851
2015-12-16 23:41:05 +00:00
Eric Fiselier e2e332a50e Make noexcept specifications on __hash_table definitions match their declarations.
llvm-svn: 255738
2015-12-16 00:53:04 +00:00
Eric Fiselier af5b54a249 Workaround nasty GCC bug that caused testsuite to hang
llvm-svn: 255734
2015-12-16 00:35:45 +00:00
Eric Fiselier 8087ddd1e6 Remove unused _LIBCPP_HAS_NO_ALWAYS_INLINE_VARIADICS macro
llvm-svn: 255686
2015-12-15 22:19:03 +00:00
Eric Fiselier 8dcfcf79ab [libcxx] Enable noexcept for GCC 4.6 and greater
Summary:
This patch allows GCC 4.6 and above to use `noexcept` as opposed to `throw()`. 

Is it an ABI safe change to suddenly switch on `noexcept`? I imagine it must be because it's disabled in w/ clang in C++03 but not C++11.


Reviewers: danalbert, jroelofs, mclow.lists

Subscribers: cfe-commits

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

llvm-svn: 255683
2015-12-15 22:16:47 +00:00
Eric Fiselier fd10d98ed0 Mark declarations of externally instantiated functions as inline so GCC doesn't complain.
llvm-svn: 255599
2015-12-15 01:41:41 +00:00
Eric Fiselier 831c112954 Fix various GCC mis-configurations for newer versions.
This patch goes through and enables C++11 and C++14 features for newer GCC's.
The main changes are:

1. Turn on variable templates. (Uses __cpp_variable_templates)
2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501).
3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404)
4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6.

llvm-svn: 255585
2015-12-15 00:32:21 +00:00
Eric Fiselier 08ce75b6c6 Update paths in libc++ build instructions. Patch from Jonathan Anderson.
llvm-svn: 255561
2015-12-14 22:26:28 +00:00
Eric Fiselier d5262627eb Update how libc++/libc++abi link the tests. Follow up on r255559.
llvm-svn: 255560
2015-12-14 22:24:19 +00:00
Marshall Clow 6e07ccdfe1 K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now more of them are passing. Thanks
llvm-svn: 255519
2015-12-14 18:11:51 +00:00
Marshall Clow 25090a91bb Missed this on the previous (255517) commit
llvm-svn: 255518
2015-12-14 18:02:23 +00:00
Marshall Clow 94b5bc4263 Fix a corner case that involved calling rethrow_if_nested with a type that had a deleted operator&. Added a test to catch this as well. Thanks to Ville for the heads-up.
llvm-svn: 255517
2015-12-14 18:01:56 +00:00
Marshall Clow 161eae2daa Add add_lvalue_ref tests for a few function types, with a note why not more
llvm-svn: 255513
2015-12-14 17:34:03 +00:00
Evgeniy Stepanov 2abfe726b2 Replace cmake check for printf with a check for fopen.
Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255187
2015-12-10 00:45:18 +00:00
Eric Fiselier 6a8678edee Remove redundant _LIBCPP_ALWAYS_INLINE attribute from __convert_to_integral overloads
llvm-svn: 255185
2015-12-10 00:43:37 +00:00
Evgeniy Stepanov 26ba3870bf Remove visibility attributes from out-of-class method definitions in iostreams.
No point in pretending that these methods are hidden - they are
actually exported from libc++.so. Extern template declarations make
them part of libc++ ABI.

This patch does not change libc++.so export list (at least on Linux).

llvm-svn: 255177
2015-12-09 23:42:30 +00:00
Evgeniy Stepanov 02b8e94943 Add 3 more missing inline/visibility attributes.
These are the cases when an out-of-class definition of a method is
marked _LIBCPP_INLINE_VISIBILITY, but the in-class declaration is
not. This will start failing when (or if) we switch to
attribute((internal_linkage)).

llvm-svn: 255166
2015-12-09 22:32:36 +00:00
Eric Fiselier fff5ec035b Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.
llvm-svn: 255162
2015-12-09 22:03:06 +00:00
Marshall Clow 146c640e81 Cleaned up the intro for the TS status page; really need much more info here
llvm-svn: 254971
2015-12-08 00:08:23 +00:00
Chris Bieneman a1b79aeab9 [CMake] If you're not installing the libcxx library, exclude it from the "all" target so it doesn't get built when you run "ninja install"
This is just a build dependency optimization. Running check-libcxx will still build libcxx and function as expected, it just removes libcxx from the all build and install targets.

llvm-svn: 254628
2015-12-03 18:52:54 +00:00
Marshall Clow b8427293df Last bit of P0006; mark it as complete
llvm-svn: 254290
2015-11-30 05:39:30 +00:00
Marshall Clow 12dff9e66a Fix bugs in alignment_of_v, etc. Re-enable the newly added tests
llvm-svn: 254289
2015-11-30 05:20:00 +00:00
Marshall Clow 00b6b01592 Temporarily disable new tests while I figure out what's going on
llvm-svn: 254288
2015-11-30 05:15:10 +00:00
Marshall Clow c8f3816e63 Fix bad macros
llvm-svn: 254287
2015-11-30 05:10:10 +00:00
Marshall Clow 825a9edb2e Missing file from last commit
llvm-svn: 254286
2015-11-30 05:04:48 +00:00