5782 Commits

Author SHA1 Message Date
Jeffrey Smith II dd2d7b0ffe Remove timespec_get for now 2020-06-05 10:33:58 -04:00
Bucky Kittinger a27e136baa Merge pull request #9 from EOSIO/feature/llvm9-jeff
Bump to libcxx9
2020-06-04 16:17:25 -04:00
Jeffrey Smith II 8ccb1fa7c2 Merge remote-tracking branch 'origin/eosio' into HEAD 2020-06-01 15:18:36 -04:00
Bucky Kittinger fb4b3725ab Merge pull request #7 from EOSIO/feature/eos-cdt-date-time-iso-string
Add chrono.cpp definitions to support the creation of time point from…
2020-02-05 15:44:08 -05:00
Victor Camacho 3ad8004cbb Add chrono.cpp definitions to support the creation of time point from iso string in cdt 2020-02-05 14:06:48 -05:00
Bucky Kittinger a7f482c58b fixes for libcxx 9 update 2019-11-18 18:04:16 -05:00
Bucky Kittinger 9188666e15 more changes for llvm9 2019-11-15 18:45:20 -05:00
Bucky Kittinger 545cce8005 update to release_90 2019-11-14 17:46:20 -05:00
Bucky Kittinger da29cefe81 delete unneeded directories 2019-11-14 14:57:55 -05:00
swatanabe-b1 d45faf798d Merge pull request #6 from EOSIO/suppress-redef-warnings
Cherry pick useful parts from fix/native_support
2019-11-08 16:30:42 -05:00
Steven Watanabe 8cc53c0007 Cherry pick useful parts from fix/native_support 2019-11-08 16:25:58 -05:00
swatanabe-b1 d9390e2adb Merge pull request #5 from conr2d/add-time
add back std::time
2019-11-07 09:11:58 -05:00
Tom Stellard 2076f539f4 Bump version to 9.0.1
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@374218 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 20:41:02 +00:00
Zoe Carver 61b414caa6 Update libc++ release notes
This patch updates the libc++ release notes.
I have picked out several features/fixes/updates
that I think are worth mentioning.



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@370514 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-30 20:04:14 +00:00
Hans Wennborg a7af9ff946 ReleaseNotes: remove in-progress warning and empty sections
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@370366 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-29 14:34:13 +00:00
Hans Wennborg 92095a21e7 Merging r369364:
------------------------------------------------------------------------
r369364 | miyuki | 2019-08-20 12:19:55 +0200 (Tue, 20 Aug 2019) | 6 lines

[libcxx] Fix build breakage on mips

Fixes https://bugs.llvm.org/show_bug.cgi?id=43011 caused by
https://reviews.llvm.org/D63284.

Committing as obvious.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@369898 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-26 12:21:33 +00:00
Hans Wennborg 2da8c29d29 Merging r369537:
------------------------------------------------------------------------
r369537 | davidspickett | 2019-08-21 17:38:24 +0200 (Wed, 21 Aug 2019) | 7 lines

[libcxx] Only declare contents of threading API when
_LIBCPP_HAS_THREAD_API_EXTERNAL is not defined.

When it is defined they will be declared by the
__external_threading header instead.

Differential revision: https://reviews.llvm.org/D66518
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@369639 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-22 10:32:01 +00:00
Hans Wennborg a066453bc1 Merging r369399:
------------------------------------------------------------------------
r369399 | marshall | 2019-08-20 18:16:23 +0200 (Tue, 20 Aug 2019) | 1 line

Fix availability of __thread_id on builds with external threading. Reviewed as https://reviews.llvm.org/D66480
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@369498 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-21 07:27:19 +00:00
Hans Wennborg bb48af5d40 Merging r368867 and r368916:
------------------------------------------------------------------------
r368867 | marshall | 2019-08-14 18:21:27 +0200 (Wed, 14 Aug 2019) | 1 line

Rework recursive_timed_mutex so that it uses __thread_id instead of using the lower-level __libcpp_thread_id. This is prep for fixing PR42918. Reviewed as https://reviews.llvm.org/D65895
------------------------------------------------------------------------

------------------------------------------------------------------------
r368916 | marshall | 2019-08-14 22:54:56 +0200 (Wed, 14 Aug 2019) | 1 line

Fix thread comparison by making sure we never pass our special 'not a thread' value to the underlying implementation. Fixes PR#42918.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@369369 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-20 11:31:28 +00:00
Hans Wennborg 1d53e6cb6d Merging r366868:
------------------------------------------------------------------------
r366868 | rogfer01 | 2019-07-24 07:33:46 +0200 (Wed, 24 Jul 2019) | 6 lines

[RISCV] Implement benchmark::cycleclock::Now

This is a cherrypick of D64237 onto llvm/utils/benchmark and
libcxx/utils/google-benchmark.

Differential Revision: https://reviews.llvm.org/D65142
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@367813 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 08:14:21 +00:00
Jeeyong Um 862fc60835 add back std::strftime 2019-08-02 04:13:39 +00:00
Jeeyong Um af111712b9 add back std::time 2019-08-02 01:21:03 +00:00
Hans Wennborg cd281462e2 Drop svn version suffix.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@366547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-19 09:22:23 +00:00
Hans Wennborg 187f208c3c Creating release_90 branch off revision 366426
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/branches/release_90@366428 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-18 11:53:54 +00:00
Louis Dionne 7524ef5009 [libc++] XFAIL a test that does not behave properly on older Clang
rdar://53015486

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366359 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-17 18:54:29 +00:00
Louis Dionne e2586fd18f [libcxx] Rejigger test for destroying delete feature-test macros
In r361572, we introduced library support for C++20 destroying delete
and decided to only define the library feature-test macro when the
compiler supports the underlying language feature. This patch reworks
the tests to mirror that.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366263 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-16 21:13:40 +00:00
Louis Dionne 5f99b4ef15 [libc++] Add missing UNSUPPORTED for CTAD tests
The tests for unordered_set and unordered_multiset were missing UNSUPPORTED
markup for Apple Clang 9.1, which is still being used on some CI bots.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366259 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-16 20:41:33 +00:00
Zoe Carver 3f39fe31c4 Add contains method to associative containers. This patch implements P0458R2, adding contains to map, multimap, unordered_map, unordered_multimap, set, multiset, unordered_set, and unordered_multiset.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366170 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-16 03:21:01 +00:00
Louis Dionne c59091fb03 [libc++] Implement P0433: deduction guides for <unordered_map>
Thanks to Arthur O'Dwyer for the patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366124 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-15 20:06:01 +00:00
Eric Fiselier e4aa70cf2d Constrain workaround to avoid affecting other buildbots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366122 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-15 19:53:42 +00:00
Eric Fiselier 68a0f8c8ab Improve compile time of variant.
In particular, improve the compile time of the overload set builder
that variant uses to determine which alternative to construct.

Instead of having the __overload type construct itself recursively,
this patch uses a flat construction for the overload set.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366033 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-14 21:29:39 +00:00
Eric Fiselier 3996cfb482 Add test for variant construction with duplicate types.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366032 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-14 20:59:51 +00:00
Eric Fiselier 19063b99b0 Cleanup whitespace in <variant>. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366026 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-14 18:31:55 +00:00
Eric Fiselier d13b2c9c44 Harden variant test added in r366022
The test was brittle since it only went boom for one specific type, when
really it should go boom for all of them.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366025 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-14 18:30:34 +00:00
Eric Fiselier 301501fb78 Avoid eager template instantiation caused by the variant narrowing checks.
The standard disallows narrowing conversions when constructing a variant.
This is checked by attempting to perform braced initialization of the
destination type from the argument type. However, braced initialization
can force the compiler (mostly clang) to eagerly instantiate the
constructors of the destintation type -- which can lead to errors in
a non-immediate context.

However, as variant is currently specified, the narrowing checks only
observably apply when the destination type is arithmetic. Meaning we can
skip the check for class types. Hense avoiding the hard errors.

In order to cause fewer build breakages, this patch avoids the narrowing
check except when the destination type is arithmetic.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@366022 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-14 18:21:15 +00:00
Eric Fiselier 478bb094b5 Fix non-conformance it std::tuple.
Previously we implemented all one trillion tuple-like constructors using
a single generic overload. This worked fairly well, except that it
differed in behavior from the standard version because it didn't
consider both T&& and T const&. This was observable for certain
types.

This patch addresses that issue by splitting the generic constructor
in two. We now provide both T&& and T const& versions of the
tuple-like constructors (sort of).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365973 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 23:01:48 +00:00
Eric Fiselier 6f5ab14489 Add option to disable variant narrowing conversion changes.
The paper P0608R3 - "A sane variant converting constructor" disallows
narrowing conversions in variant. It was meant to address this
surprising problem:

  std::variant<std::string, bool> v = "abc";
  assert(v.index() == 1); // constructs a bool.

However, it also disables every potentially narrowing conversion. For
example:

  variant<unsigned> v = 0; // ill-formed
  variant<string, double> v2 = 42; // ill-formed (int -> double narrows)

These latter changes break code. A lot of code. Within Google it broke
on the order of a hundred thousand target with thousands of root causes
responsible for the breakages.

Of the breakages related to the narrowing restrictions, none of them
exposed outstanding bugs. However, the breakages caused by boolean
conversions (~13 root causes), all but one of them were bugs.

For this reasons, I am adding a flag to disable the narrowing conversion
changes but not the boolean conversions one.

One purpose of this flag is to allow users to opt-out of breaking changes
in variant until the offending code can be cleaned up. For non-trivial
variant usages the amount of cleanup may be significant.

This flag is also required to support automated tooling, such as
clang-tidy, that can automatically fix code broken by this change.
In order for clang-tidy to know the correct alternative to construct,
it must know what alternative was being constructed previously, which
means running it over the old version of std::variant.

Because this change breaks so much code, I will be implementing the
aforementioned clang-tidy check in the very near future.

Additionally I'm plan present this new information to the committee so they can
re-consider if this is a breaking change we want to make.

I think libc++ should very seriously consider pulling this change
before the 9.0 release branch is cut. But that's a separate discussion
that I will start on the lists.

For now this is the minimal first step.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365960 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 21:32:11 +00:00
Louis Dionne 86f93e801c [libc++] Add XFAILs for CTAD tests on older compilers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365923 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 17:30:57 +00:00
Eric Fiselier 6507e2af11 Mark destroying delete test as UNSUPPORTED with clang 7
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365856 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 01:16:08 +00:00
Eric Fiselier e98aed4733 Tolerate import errors in "not.py" implementation
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365855 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 01:13:05 +00:00
Marshall Clow 3c73561841 Reorganize the 'bit' header to make most of the facilities available for internal use pre-C++20. NFC for external users
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365854 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 01:01:55 +00:00
Eric Fiselier 1639ec22a2 Add another buildbot username to the workaround list
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365848 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 00:16:38 +00:00
Eric Fiselier 5e40011381 Attempt to override broken buildbot config for libc++abi.
The buildbots were changed to pass -DLIBCXX_CXX_ABI=libcxxabi, but
they don't provide an include path for the library, so cxxabi.h is
never found while building libc++.

This is a temporary change until the buildbots are updated or until
D63883 lands in a form that unbreaks the bots

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365847 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-12 00:02:49 +00:00
Eric Fiselier f579c7c19d Fix memory leak in set and map.
When assigning an initializer list into set/map, libc++ would
leak memory if the initializer list contained equivalent keys
because we failed to check if the insertion was successful.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365840 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-11 23:13:38 +00:00
Louis Dionne 2980850307 [libc++] Implement deduction guides for <unordered_set>
Thanks to Arthur O'Dwyer for the patch.
Differential Revision: https://reviews.llvm.org/D58617

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365788 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-11 15:16:39 +00:00
Saleem Abdulrasool 9eaa4d176d build: use multiple install rather than building up a list
Rather than building up a list to iterate over later, just create multiple
install commands based on the configuration. This makes it easier to see what
is getting installed and allows for the install handling to be centralised. NFC

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365562 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-09 21:43:01 +00:00
Vitaly Buka 9132b5b287 Revert "[libc++] Take 2: Do not cleverly link against libc++abi just because it happens to be there"
r365326 still breaks bots:
http://lab.llvm.org:8011/builders/netbsd-amd64/builds/20712/steps/ninja%20build%20local/logs/stdio
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/39477/steps/test%20tsan%20in%20debug%20compiler-rt%20build/logs/stdio

And probably others

This reverts commit 945b9ec0693390ef35fe8c6b774495312246b8b6.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365359 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-08 17:46:23 +00:00
Louis Dionne 0a371878f1 [libc++] Take 2: Do not cleverly link against libc++abi just because it happens to be there
Summary:
Otherwise, when libcxxabi is not an enabled project in the monorepo, we
get a link error because we try to link against non-existent cxxabi_shared.

More generally, we shouldn't change the behavior of the build based on
implicit things like whether a file happens to be at a specific path or
not.

This is a re-application of r365222 that had been reverted in r365233
because it broke the build bots. However, the build bots now specify
explicitly what ABI library they want to use (libc++abi), so this
commit should now be OK to merge.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365326 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-08 14:49:35 +00:00
Marshall Clow 7a377e25a4 Make forward_list::remove/remove_if/unique all return void before C++20; undoes that bit of D58332. Thanks to Mikhail Maltsev for pointing this out
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365290 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-08 03:45:28 +00:00
Eric Fiselier a386369f02 Make ~mutex and ~condition_variable trivial on Windows.
The implementations of __libcpp_mutex_destroy and __libcpp_condvar_destroy
are already NOPs, so this optimization is safe to perform.

See r365273 and PR27658 for more information.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@365281 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-07 17:24:03 +00:00