Commit Graph

3306 Commits

Author SHA1 Message Date
Eric Fiselier
2017e23c4a Revert addition of __libcpp_library_version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285466 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 22:37:24 +00:00
Aditya Kumar
c715f55245 Added 'inline' attribute to basic_string's destructor
Author: laxmansole

Reviewers: howard.hinnant
           mclow.lists
Subscribers: EricWF, flyingforyou, evandro

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

Reapplying the patch as the bug https://llvm.org/bugs/show_bug.cgi?id=30341 is fixed.

Currently basic_string's destructor is not getting inlined. So adding 'inline' attribute to ~basic_string().
Worked in collaboration with Aditya Kumar.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285456 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 21:27:24 +00:00
Eric Fiselier
3c7747562d Fix Clang 3.6 build error
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285445 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 20:19:36 +00:00
Eric Fiselier
b18d684964 Try 2 to add extern C++ to __libcpp_library_version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 18:26:06 +00:00
Eric Fiselier
3dd46201c1 Explicitly specify extern "C++" on __libcpp_library_version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285403 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 15:02:30 +00:00
Eric Fiselier
c457a97363 Fix test when using an installed libc++
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285392 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 11:01:12 +00:00
Eric Fiselier
a0b4d55133 Add more tests for optional<const T>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 06:40:29 +00:00
Eric Fiselier
68635ee647 Update mac ABI list
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 06:09:44 +00:00
Eric Fiselier
6994470189 Add __libcpp_version file and __libcpp_library_version function.
This patch does two seperate things. First it adds a file called
"__libcpp_version" which only contains the current libc++ version
(currently 4000). This file is not intended for use as a header. This file
is used by Clang in order to easily determine the installed libc++ version.
This allows Clang to enable/disable certain language features only when the
library supports them.

The second change is the addition of _LIBCPP_LIBRARY_VERSION macro, which
returns the version of the installed dylib since it may be different than
the headers.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285382 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-28 06:06:50 +00:00
Tim Shen
38c2a3767b [libcxx] Make regex_match backtrack when search fails
Summary:
Fixes PR19851.
alg.re.match/ecma.pass.cpp still XFAILS on linux, but after commenting out
locale-related tests, it passes. I don't have a freebsd machine to produce a
full pass.

Reviewers: mclow.lists

Subscribers: cfe-commits, emaste

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285352 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 21:40:34 +00:00
Stephan T. Lavavej
e465ff34be [PATCH] D25483: [libcxx] [test] Fix non-Standard assumptions about how many elements are allocated
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285346 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 21:25:12 +00:00
Marshall Clow
276a5209a3 Move 'quoted' for string_view from <string_view> to <iomanip> (where the other versions of 'quoted' live. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285300 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-27 15:10:07 +00:00
Casey Carter
856947863f Cleanup nonportable behavior in tests for std::any
Fixes MS issues 63, 64, and 65.

test/std/utilities/any/any.class/any.cons/move.pass.cpp:
* "Moves are always destructive" is not a portable assumption; check with LIBCPP_ASSERT.

test/std/utilities/any/any.class/any.cons/value.pass.cpp:
* The standard does not forbid initializing std::any from any pointer-to-function type. Remove the non-conforming "DecayTag" test.

test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp:
* Self-swap is not specified to perform no moves; check with LIBCPP_ASSERT.

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



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285234 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 20:18:13 +00:00
Casey Carter
b035d8f064 Silence unused parameter warnings in archetypes.hpp
Reviewed at: https://reviews.llvm.org/D25958



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-26 17:22:25 +00:00
Eric Fiselier
e577a4c660 Fix nullptr tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25 20:45:17 +00:00
Eric Fiselier
da2c55edd9 Update revision number in CHANGELOG.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285102 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25 19:44:38 +00:00
Eric Fiselier
8330b1ec02 [libcxx] Build with -fvisibility-inlines-hidden -- Remove 20 inline definitions from the dylib
Summary:
This patch turns on `-fvisibility-inlines-hidden` when building  the dylib. This is important so that libc++.dylib doesn't accidentally export inline-functions which are ODR used somewhere in the dylib.

On OS X this change has no effect on the current ABI of the dylib. Unfortunately on Linux there are already ~20 inline functions which are unintentionally exported by the dylib. Almost all of these are implicitly generated destructors. I believe removing these function definitions is safe because every "linkage unit" which uses these functions has its own definition, and therefore shouldn't be dependent on libc++.dylib to provide them.

Also could a FreeBSD maintainer comment on the ABI compatibility of this patch?



Reviewers: mclow.lists, emaste, dexonsmith, joker-eph-DISABLED, jroelofs, danalbert, mehdi_amini, compnerd, dim

Subscribers: beanz, mgorny, cfe-commits, modocache

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25 19:43:44 +00:00
Eric Fiselier
6979a42e44 [libc++] Fix modules build - Rework __refstring definition
Summary:
`__libcpp_refstring` currently has two different definitions. First there is the complete definition in `<__refstring>` but there is also a second in  `<stdexcept>`.  The historical reason for this split is because both libc++ and libc++abi need to see the inline definitions of __libcpp_refstrings methods, but the `<stdexcept>` header doesn't.  However this is an ODR violation and breaks the modules build.

This patch fixes the issue by creating a single class definition in `<stdexcept>` and changing `<__refstring>` to contain only the inline method definitions. This way both `libcxx/src/stdexcept.cpp` and `libcxxabi/src/stdexcept.cpp` see the same declaration in `<stdexcept>` and definitions in `<__refstring>`

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285100 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25 19:33:14 +00:00
Eric Fiselier
c4a7e9177a Fix non-portable tests for temp_directory_path(...)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 20:40:35 +00:00
Eric Fiselier
04b7f3da2b Add missing include in string_view tests. Patch from Billy ONeil @ microsoft
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285012 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 20:11:17 +00:00
Eric Fiselier
44543930e4 Fix shadow warnings in string_view tests. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@285011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 20:10:00 +00:00
Eric Fiselier
87c6313718 Backout enabling -Wshadow until I have time to fix the breakage
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284952 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 22:24:11 +00:00
Petr Hosek
44197a11b1 [libcxx] Use C++14 when building libc++ with musl
musl's pthread implementations use volatile types in their structs
which is not being constexpr in C++11 but is in C++14.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284950 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 21:48:27 +00:00
Eric Fiselier
1e836f0cc7 Fix breakage introduced by adding -Wshadow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284946 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 19:26:39 +00:00
Eric Fiselier
6547b4fa2b Fix libc++ specific assertion in permissions(...) tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 19:14:58 +00:00
Eric Fiselier
c8e7821916 Turn on -Wshadow so I find occurances before STL does
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 19:01:10 +00:00
Eric Fiselier
26cbb8d03e Make make_from_tuple tests more portable. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 18:55:51 +00:00
Eric Fiselier
317120240b Fix unreferenced parameters. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 18:52:58 +00:00
Eric Fiselier
e2c4227504 Fix shadowing warning. Patch from STL@microsoft.com
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-23 18:47:58 +00:00
Tim Shen
741cb8b8e6 [libcxx] Support std::regex_constants::match_not_null
Summary: Fixes PR21597.

Reviewers: mclow.lists, EricWF

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-21 20:41:47 +00:00
Bruno Cardoso Lopes
2d164cbf6f [ModuleMap] Add more module entries to cover some non modular headers
These modules are necessary on Darwin to allow modules with
'no_undeclared_includes' (introduced in clang r284797) to work properly
while using libc++ headers.

Patch extracted from a suggested module.modulemap from Richard Smith!

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284801 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-21 03:14:27 +00:00
Marshall Clow
464abc8aee Adding a missing constexpr test for reverse_iterator operator[].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20 14:57:34 +00:00
Eric Fiselier
6d36efa497 Attempt to workaround XPASS for aligned allocation tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-20 03:31:07 +00:00
Marshall Clow
4414a6a911 Implement constexpr support for reverse_iterator. Reviewed as https://reviews.llvm.org/D25534
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 15:12:50 +00:00
Michal Gorny
4f031f899c [cmake] Allow testing against installed LLVM with no sources
Adjust the stand-alone build files to accept either CMake files from
LLVM_CMAKE_PATH or from LLVM_MAIN_SRC_DIR instead of requiring both.
This makes it possible to run libcxx tests on top of installed LLVM
and lit, without having to unpack a copy of LLVM sources. Furthermore,
it avoids adding duplicate paths.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284583 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-19 12:34:17 +00:00
Michal Gorny
7c2afba80b [solaris] Convert the support library to C++ to fix -std=c++11 build
Convert the Solaris xlocale.c compatibility library from plain C to C++
in order to fix the build failures caused by the addition of -std=c++11
to LIBCXX_COMPILE_FLAGS. The additional flag got propagated to the C
file, resulting in error with strict compilers.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284494 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 16:54:59 +00:00
Michal Gorny
bf9e11c4a6 [solaris] Fix iswxdigit_l() support function prototype
Fix the iswxdigit_l() function prototype to take wint_t parameter
instead of incorrect wchar_t.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284493 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-18 16:54:54 +00:00
Eric Fiselier
4035b668e6 Make any_cast<void()>(nullptr) compile
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284333 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 11:56:38 +00:00
Eric Fiselier
2a901dae5a Update LWG 2754 status
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284326 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 03:52:48 +00:00
Eric Fiselier
100603508d Fix use of non-constexpr C++14 addressof
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284325 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 03:49:18 +00:00
Eric Fiselier
fcdb3f77e8 Update LWG 2767 and add test case
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284324 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 03:45:06 +00:00
Eric Fiselier
46c0fcb2b3 Update status for std::optional LWG issues and fix an optional SFINAE bug
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284323 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 03:21:35 +00:00
Eric Fiselier
846edfb837 Update issue status for LWG 2744
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284322 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 02:51:50 +00:00
Eric Fiselier
100a39d169 Update issue status for LWG 2768 and 2769
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284321 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 01:43:43 +00:00
Eric Fiselier
6e5869a3fb Update notes for LWG 2678
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284319 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 00:49:33 +00:00
Eric Fiselier
1e1bbc7437 Implement LWG 2712 and update other issues status
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 00:47:59 +00:00
Eric Fiselier
451f34db16 Implement LWG 2681 and 2682
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284316 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-16 00:29:22 +00:00
Eric Fiselier
8bbf53fc93 Mark LWG 2680 as done
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284315 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-15 23:12:30 +00:00
Eric Fiselier
25dc5bdb88 Implement LWG 2672.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-15 23:05:04 +00:00
Eric Fiselier
620a9a5ecf Implement modified LWG 2665
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@284313 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-15 22:37:42 +00:00