Commit Graph

4099 Commits

Author SHA1 Message Date
Marshall Clow
4e42dc97f3 Change the return type of emplace_[front|back] back to void when building with C++14 or before. Resolves PR31680.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292990 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 23:09:12 +00:00
Marshall Clow
b4d17ade89 Remove auto_ptr in C++17. Get it back by defining _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292986 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 22:22:33 +00:00
Marshall Clow
bef26f787d Add a test to make sure that implicit conversion from error_code to bool will fail
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292969 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 19:44:55 +00:00
Marshall Clow
9a89d24bb0 Update status for LWG2733
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292967 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 19:37:09 +00:00
Marshall Clow
98494057e8 Implement LWG2733: [fund.ts.v2] gcd / lcm and bool. We already did tbis for C++17, so replicate the changes in experimental.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292962 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 18:15:48 +00:00
Marshall Clow
a5f53d0730 Mark LWG2736 as complete. No code changes, but we have more tests now
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292958 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 18:03:32 +00:00
Marshall Clow
b08183bc1f A couple more tests for constexpr stuff in string_view. No changes other than test code.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292943 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 16:28:02 +00:00
Eric Fiselier
c73c1fc7ae Update Linux ABI lists to reflect inlining change in LLVM. More investigation tomorrow.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292929 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 13:03:40 +00:00
Eric Fiselier
a49c64f182 Revert "[libcxx] Never use <cassert> within libc++"
This reverts commit r292883. Unfortunately <string_view> uses
_LIBCPP_ASSERT in a way which is not compatible with the C++11 dylib
build. I'll investigate more tomorrow.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292923 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 12:26:01 +00:00
Eric Fiselier
1a3bde19ef Revert yet another accidental change caused by r292684
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292908 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 10:38:46 +00:00
Eric Fiselier
1bd94ed50d Fix bad XFAIL which recent LIT changes diagnosed
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292905 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 10:19:32 +00:00
Eric Fiselier
66ed0bc836 Remove all usages of REQUIRES-ANY in the test suite.
Pending LIT changes are about to remove the REQUIRES-ANY keyword
in place of supporting boolean && and || within "REQUIRES". This
patch prepares libc++ for that change so that when applied
the bots don't lose their mind.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292901 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 09:11:08 +00:00
Eric Fiselier
2c90d1f776 [libcxx] Never use <cassert> within libc++
Summary:
It is my opinion that libc++ should never use `<cassert>`, including in the `dylib`. This patch remove all uses of `assert` from within libc++ and replaces most of them with `_LIBCPP_ASSERT` instead.

Additionally this patch turn `LIBCXX_ENABLE_ASSERTIONS`  off by default, because the standard library should not be aborting user programs unless explicitly asked to.

Reviewers: mclow.lists, compnerd, smeenai

Reviewed By: mclow.lists

Subscribers: mgorny, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292883 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-24 04:57:33 +00:00
Eric Fiselier
cdb5d25004 Manually force the use of __decltype in C++03 with Clang 3.4.
<string> uses `decltype` in a way incompatible with `__typeof__`.
This is problematic when compiling <string> with Clang 3.4 because
even though it provides `__decltype` libc++ still used `__typeof__`
because clang 3.4 doesn't provide __is_identifier which libc++
uses to detect __decltype.

This patch manually detects Clang 3.4 and properly configures
for it.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292833 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 21:41:13 +00:00
Eric Fiselier
f472d6c89d Fix GCC C++03 build by hiding default template argument in C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292830 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 21:24:58 +00:00
Marshall Clow
fbe68a68ab Implement LWG#2778: basic_string_view is missing constexpr.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292823 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 19:53:28 +00:00
Marshall Clow
6111e65cba Fixed a typo in __config that prevented the aligned new/delete tests from passing on Mac OS.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 19:51:54 +00:00
Marshall Clow
ec1d3f7e2d Revert previous cleanup; I got too agressive removing #ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292809 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 18:00:15 +00:00
Marshall Clow
45f4ec28a2 Removed some un-needed ifdefs
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292806 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-23 17:25:38 +00:00
Eric Fiselier
85e34e4ab7 Revert accidentally changes which reverted r292582
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292717 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 14:42:44 +00:00
Eric Fiselier
17b6e14cdc Fix recent build errors
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292689 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 00:57:29 +00:00
Eric Fiselier
952eaecfc6 Implement P0513R0 - "Poisoning the Hash"
Summary:
Exactly what the title says.

This patch also adds a `std::hash<nullptr_t>` specialization in C++17, but it was not added by this paper and I can't find the actual paper that adds it.

See http://wg21.link/P0513R0 for more info.

If there are no comments in the next couple of days I'll commit this

Reviewers: mclow.lists, K-ballo, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292684 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-21 00:02:12 +00:00
Eric Fiselier
ee856f131d Don't default older GCC's to C++17, but C++14 or C++11 instead
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 12:54:45 +00:00
Eric Fiselier
0cefc52072 Revert "Don't default older GCC's to C++17, but C++14 or C++11 instead"
The commit isn't quite right, and I want to only have to merge one
commit into 4.0

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292606 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 12:52:59 +00:00
Eric Fiselier
76c85b10e2 Don't default older GCC's to C++17, but C++14 or C++11 instead
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292605 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 12:46:57 +00:00
Eric Fiselier
19b1c83593 Still expose std::align_val_t in C++17 even if we don't have aligned new/delete.
r292564 disabled the aligned new/delete overloads on platforms without
posix_memalign. Unfortunately that patch also disabled the  align_val_t
definition in C++17 as well.

This patch causes align_val_t to be exposed in C++17 regardless
of if we have the new/delete overloads.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 06:27:34 +00:00
Eric Fiselier
478f902c62 Refactor unique_ptr/shared_ptr deleter test types into single header.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292577 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 04:39:17 +00:00
Eric Fiselier
d54d974f1f Disable aligned new/delete on Apple platforms without posix_memalign
Summary:
This patch disables the aligned new/delet overloads on Apple platforms without `posix_memalign`. This fixes libc++.dylib build regressions on such platforms.
This fixes http://llvm.org/PR31448.

This patch should also be merged into the 4.0 release branch


Reviewers: mclow.lists, rsmith, dexonsmith, jeremyhu

Reviewed By: mclow.lists

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 01:47:26 +00:00
Eric Fiselier
e28ff33405 [NFC] Group aligned new/delete definitions together in new.cpp
This patch is cleanup to prepare for future changes

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292560 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 01:13:49 +00:00
Eric Fiselier
fba0eeeddd Fix handling of Apple target triple when checking the ABI lists.
The check-cxx-abilist rule uses TARGET_TRIPLE to determine which
ABI list to check. However the triple on Apple contains the darwin
version which changes frequently, but libc++ doesn't need
different ABI lists for each darwin version.

This patch strips the minor version and patchlevel from TARGET_TRIPLE
before using it to determine the ABI list.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292557 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 00:57:08 +00:00
Eric Fiselier
e013dacf4a Fix demangle helper after r286788
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-20 00:00:31 +00:00
Eric Fiselier
e70e03c7f6 Adjust msvc_stdlib_force_include.hpp to handle clang++
Summary: This patch adjusts the newly added `msvc_stdlib_force_include.hpp` so that it also works when used with `clang++`.

Reviewers: STL_MSFT

Reviewed By: STL_MSFT

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292539 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-19 23:48:05 +00:00
Marshall Clow
56257d4918 Mark two of the TS implementations as 'in progress'
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-19 15:30:36 +00:00
Stephan T. Lavavej
aa0c167446 [libcxx] [test] Add msvc_stdlib_force_include.hpp.
No functional change; nothing includes this, instead our test harness
injects it via the /FI compiler option.

No code review; blessed in advance by EricWF.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292443 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 22:19:14 +00:00
Stephan T. Lavavej
16e2ba19df [libcxx] [test] Fix comment typos, strip trailing whitespace.
No functional change, no code review.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292434 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 20:10:25 +00:00
Stephan T. Lavavej
c3564b92bc [libcxx] [test] Fix MSVC warnings C4127 and C6326 about constants.
MSVC has compiler warnings C4127 "conditional expression is constant" (enabled
by /W4) and C6326 "Potential comparison of a constant with another constant"
(enabled by /analyze). They're potentially useful, although they're slightly
annoying to library devs who know what they're doing. In the latest version of
the compiler, C4127 is suppressed when the compiler sees simple tests like
"if (name_of_thing)", so extracting comparison expressions into named
constants is a workaround. At the same time, using std::integral_constant
avoids C6326, which doesn't look at template arguments.

test/std/containers/sequences/vector.bool/emplace.pass.cpp
Replace 1 == 1 with true, which is the same as far as the library is concerned.

Fixes D28837.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292432 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 20:09:56 +00:00
Eric Fiselier
0d4bd61d78 Re-add mechanism to override LIT options using enviroment variables.
There was a dumb mistake in the original commit that has now
been fixed

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292351 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 07:56:57 +00:00
Eric Fiselier
3dcf50c4b2 Revert "Add mechanism to override LIT options using enviroment variables"
The buildbots currently depend on the old configuration. I'll recommit
once Zorg is fixed and reset

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292347 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 06:24:18 +00:00
Eric Fiselier
55c5f6be8d Add mechanism to override LIT options using enviroment variables
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292346 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 06:08:38 +00:00
Eric Fiselier
f2b48899a5 Fix filesystem::path assignment from {}
Adding `path::operator=(string_type&&)` made the expression `p = {}`
ambiguous. This path fixes that ambiguity by making the `string&&`
overload a template so it ranks lower during overload resolution.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292345 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 05:48:55 +00:00
Eric Fiselier
6fb6490957 Get more std::string _LIBCPP_DEBUG tests passing
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292342 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 05:34:42 +00:00
Eric Fiselier
44dbdb4b85 More configuration changes for running the test suite against MSVC's STL
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292337 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 03:57:38 +00:00
Eric Fiselier
6fbac40a30 Add support for running our test suite against MSVC's STL
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292326 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 01:48:54 +00:00
Eric Fiselier
08305aaf6e Allow sym_diff.py to report non-zero for non-breaking ABI changes
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292297 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-18 00:05:01 +00:00
Eric Fiselier
1b30568b31 Fix type_info's constructor by making it explicit again.
In recent changes type_info's private constructor was
accidentally made implicit. This patch fixes that.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292294 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 23:41:42 +00:00
Eric Fiselier
8e39559043 Don't strip -m32 from the user provide command line flags. This fixes the compiler-rt 32 bit sanitizer build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292291 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 23:27:56 +00:00
Stephan T. Lavavej
c8fc92cc09 [libcxx] [test] Don't ask whether Incomplete& can be assigned to.
This is the subject of an active NB comment. Regardless of what the Working
Paper currently says, asking this question is morally wrong, because the
answer can change when the type is completed. C1XX now detects such
precondition violations and complains about them; perhaps Clang should too.

Fixes D28591.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292281 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 22:24:45 +00:00
Eric Fiselier
37b2be9c58 Fix std::string assignment ambiguity from braced initializer lists.
When support for `basic_string_view` was added to string it also
added new assignment operators from `basic_string_view`. These caused
ambiguity when assigning from a braced initializer. This patch fixes
that regression by making the basic_string_view assignment operator
rank lower in overload resolution by making it a template.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292276 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 22:10:32 +00:00
Eric Fiselier
a7ae303de3 Add ABI option to remove recently inlined __shared_count functions from the library.
In order to allow inlining of previously out-of-line functions without an ABI break
libc++ provides legacy definitions in the dylib that old programs can
continue to use. Unfortunatly Windows link.exe detects this hack and diagnoses the duplicate
definitions.

This patch disable the duplicate definitions on Windows by adding an ABI option
which disables all "legacy out-of-line symbols"

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292190 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:16:26 +00:00
Eric Fiselier
9133eadd60 Fix DLL build by removing _LIBCPP_FUNC_VIS from member of class marked dllexport
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292185 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-17 03:05:31 +00:00