5213 Commits

Author SHA1 Message Date
Louis Dionne
8c8f0e1933 [libcxx] Remove unused macro _LIBCPP_HAS_UNIQUE_TYPEINFO
Summary:
We already have the negation of that as _LIBCPP_HAS_NONUNIQUE_TYPEINFO.
Having both defined is confusing, since only one of them is used.

Reviewers: EricWF, mclow.lists

Subscribers: christof, jkorous, dexonsmith, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349947 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 20:14:43 +00:00
Louis Dionne
5de5c1197f [NFC] Fix typo in comment
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349932 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 17:32:23 +00:00
Eric Fiselier
5f14fb5f34 Fix test case breakages caused by lexically_relative change
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 04:38:22 +00:00
Eric Fiselier
1c5aabc9b7 Don't forward declare _FilesystemClock in C++03
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349887 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 04:30:04 +00:00
Eric Fiselier
fdb4802a74 Fix copy paste error in file_clock tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349886 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 04:27:45 +00:00
Eric Fiselier
da05bdc85c Implement LWG 3096: path::lexically_relative is confused by trailing slashes
path("/dir/").lexically_relative("/dir"); now returns "." instead of ""

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349885 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 04:25:40 +00:00
Eric Fiselier
3cf34d1caf Implement LWG 3065: Make path operators friends.
This prevents things like:

using namespace std::filesystem;
auto x = L"a/b" == std::string("a/b");

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349884 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 04:09:01 +00:00
Eric Fiselier
874280d14d Implement LWG 3145: file_clock breaks ABI for C++17 implementations.
This patch adds std::chrono::file_clock, but without breaking the
existing ABI for std::filesystem.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349883 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 03:54:57 +00:00
Eric Fiselier
a2037284d4 Implement LWG 2936: Path comparison is defined in terms of the generic format
This patch implements path::compare according to the current spec. The
only observable change is the ordering of "/foo" and "foo", which orders
the two paths based on having or not having a root directory (instead
of lexically comparing "/" to "foo").

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349881 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 03:16:30 +00:00
Eric Fiselier
545d0b950d Mark two filesystem LWG issues as complete - nothing to do
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349877 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-21 02:17:00 +00:00
Louis Dionne
8daffdabc5 [libcxx] Fix order checking in unordered_multimap tests.
Some tests assume that iteration through an unordered multimap elements
will return them in the same order as at the container creation. This
assumption is not true since the container is unordered, so that no
specific order of elements is ever guaranteed for such container. This
patch introduces checks verifying that any iteration will return elements
exactly from a set of valid values and without repetition, but in no
particular order.

Reviewed as https://reviews.llvm.org/D54838.
Thanks to Andrey Maksimov for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349780 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-20 17:55:31 +00:00
Volodymyr Sapsai
d805c8746a [libcxx] Use custom allocator's construct in C++03 when available.
Makes libc++ behavior consistent between C++03 and C++11.

Can use `decltype` in C++03 because `include/__config` defines a macro when
`decltype` is not available.

Reviewers: mclow.lists, EricWF, erik.pilkington, ldionne

Reviewed By: ldionne

Subscribers: dexonsmith, cfe-commits, howard.hinnant, ldionne, christof, jkorous, Quuxplusone

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


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349676 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-19 20:08:43 +00:00
Eric Fiselier
1e048a3c69 Work around GCC 9.0 regression
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349663 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-19 18:58:22 +00:00
Marshall Clow
ff04a5678c Add missing include to test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349639 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-19 16:39:04 +00:00
Marshall Clow
9ff404deec Portability fix: add missing includes and static_casts. Reviewed as https://reviews.llvm.org/D55777. Thanks to Andrey Maksimov for the patch.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349566 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 23:19:00 +00:00
Marshall Clow
3af9c5fa77 Rework the C strings tests to use ASSERT_SAME_TYPE. NFC there. Also change cwchar.pass.cpp to avoid constructing a couple things from zero - since apparently they can be enums in some weird C library. NFC there, either, since the values were never used.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349522 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 19:07:30 +00:00
Louis Dionne
6ad953652d [libcxx] Remove XFAILs for older macOS versions
That test doesn't fail anymore since r349378, since the assertions that
r349378 removed must have been bugs in the dylib at some point.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349484 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 13:46:28 +00:00
Louis Dionne
b8811ad2ca [libcxx] Handle AppleClang 9 and 10 in XFAILs for aligned allocation tests
I forgot that those don't behave like Clang trunk, again.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349427 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 00:42:09 +00:00
Louis Dionne
3d4bcc1de6 [libcxx] Properly mark aligned allocation macro test as XFAIL on OS X
This test was initially marked as XFAIL using `XFAIL: macosx10.YY`, and
was then moved to `UNSUPPORTED: macosx10.YY`. The intent is to mark the
test as XFAILing when a deployment target older than macosx10.14 is used,
and the right way to do this is `XFAIL: availability=macosx10.YY`.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349426 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-18 00:30:15 +00:00
Louis Dionne
ae5d5c8545 [libcxx][NFC] Properly indent nested #ifdefs and #defines
I just realized I had always been reading this wrong because of the lack
of indentation, so I'm re-indenting this properly.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349408 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 22:22:44 +00:00
Eric Fiselier
dfa283e2cf Fix FP comparisons when SSE isn't available
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349387 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 20:17:43 +00:00
Michal Gorny
4b8645f0dc [test] Add target_info for NetBSD, and XFAIL some of locale tests
Add a target_info definition for NetBSD.  The definition is based
on the one used by FreeBSD, with libcxxrt replaced by libc++abi,
and using llvm-libunwind since we need to use its unwinder
implementation to build anyway.

Additionally, XFAIL the 30 tests that fail because of non-implemented
locale features.  According to the manual, NetBSD implements only
LC_CTYPE part of locale handling.  However, there is a locale database
in the system and locale specifications are validated against it,
so it makes sense to list the common locales as supported.

If I'm counting correctly, this change enables additional 43 passing
tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349379 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 19:14:08 +00:00
Michal Gorny
c88aa7fa75 [test] [re.traits] Remove asserts failing due to invalid UTF-8
Remove the two test cases for \xDA and \xFA with UTF-8 locale, as both
characters alone are invalid in UTF-8 (short sequences).  Upon removing
them, the test passes on Linux again (and also on NetBSD, after adding
appropriate locale configuration).

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349378 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 19:13:41 +00:00
Eric Fiselier
50f14e23b5 Unbreak green dragon bots w/o __builtin_launder
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349373 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 18:37:59 +00:00
Eric Fiselier
2d0643acea Expect Clang diagnostics in std::launder test
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349364 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 16:56:24 +00:00
Louis Dionne
8f7fa38fb9 [libcxx] Speeding up partition_point/lower_bound/upper_bound
This is a re-application of r345525, which had been reverted by fear of
a regression.

Reviewed as https://reviews.llvm.org/D53994.
Thanks to Denis Yaroshevskiy for the patch.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349358 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-17 16:04:39 +00:00
Michal Gorny
a443a0013d [test] [support] Use socket()+bind() to create unix sockets portably
Replace the mknod() call with socket() + bind() for creating unix
sockets.  The mknod() method is not portable and does not work
on NetBSD while binding the socket should work on all systems supporting
unix sockets.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349305 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-16 15:12:06 +00:00
Michal Gorny
36feb1b037 [test] [ctime] Ignore -Wformat-zero-length warnings
Explicitly disable the -Wformat-zero-length diagnostic when running
ctime tests, since one of the test cases passes zero-length format
string to strftime().  When strftime() is appropriately decorated
with __attribute__(format, ...), this caused the test to fail because
of this warning (e.g. on NetBSD).

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349294 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-16 09:18:31 +00:00
Michal Gorny
dc700f1239 [regex] Use distinct __regex_word on NetBSD
NetBSD defines character classes up to 0x2000.  Use 0x8000 as a safe
__regex_word that hopefully will not collide with other values
in the foreseeable future.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349293 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-16 09:18:26 +00:00
Eric Fiselier
8c36703b2b Fix static assert diagnostic checks in i386
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349252 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 05:18:56 +00:00
Eric Fiselier
48df810b1a Try 2: Fix bug in buildbot start script
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349236 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 03:48:08 +00:00
Eric Fiselier
9468ef1494 Fix bug in buildbot start script
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349235 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 03:45:21 +00:00
Eric Fiselier
c9296e7eab Rework docker setup to make it easier to work around bugs on buildbots
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349234 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-15 03:24:33 +00:00
Eric Fiselier
01fac08922 Tolerate Clangs new static_assert messages
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349189 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 20:42:36 +00:00
Louis Dionne
03017b2675 [libcxx] Mark some tests as still failing on macosx10.14
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349187 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 20:22:44 +00:00
Marshall Clow
09e67411b7 When resolving a merge conflict, I put something inside an #ifdef. Fixed.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349181 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 19:25:22 +00:00
Marshall Clow
f927635d87 Implement P1209 - Adopt Consistent Container Erasure from Library Fundamentals 2 for C++20. Reviewed as https://reviews.llvm.org/D55532
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349178 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 18:49:35 +00:00
Louis Dionne
7213ea7c13 [libcxx] Make sure use_system_cxx_lib does not override cxx_runtime_root for DYLD_LIBRARY_PATH
Otherwise, even specifying a runtime root different from the library
we're linking against won't work -- the library we're linking against
is always used. This is undesirable if we try testing something like
linking against a recent libc++.dylib but running the tests against an
older version (the back-deployment use case).

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349171 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 18:19:14 +00:00
Eric Fiselier
ea9230c04b Update google benchmark again
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349127 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 03:48:09 +00:00
Eric Fiselier
114125f97b Update google benchmark version
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349126 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-14 03:37:13 +00:00
Thomas Anderson
e713cc0acf [libc++] Fix _LIBCPP_EXPORTED_FROM_ABI when visibility annotations are disabled
Fixes a bug where functions would get exported when building with
-fvisibility=hidden and defining _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS. No
visibility annotations should be added in this case.

The new logic for _LIBCPP_EXPORTED_FROM_ABI matches that of the other visibility
annotations around it.

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



git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349080 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-13 20:06:14 +00:00
Louis Dionne
d3f2d5ec4e [libcxx] Fix pop_back() tests to make sure they don't always just pass
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349071 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-13 18:53:17 +00:00
Louis Dionne
f77ee9b3c9 [libcxx] Add assertion in deque::pop_back when popping from an empty deque
Also, add tests making sure that vector and deque both catch the problem
when assertions are enabled. Otherwise, deque would segfault and vector
would never terminate.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348994 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 23:58:25 +00:00
Michal Gorny
f0c3a12346 [test] [depr.c.headers] XFAIL uchar.h on NetBSD
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348973 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 20:51:46 +00:00
Michal Gorny
13d947cc06 [test] [filesystems] NetBSD can do symlink permissions too
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348968 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 20:28:52 +00:00
Michal Gorny
413329eb35 [test] [filesystems] Extend FreeBSD tv_sec==-1 workaround to NetBSD
NetBSD also uses tv_sec==-1 as error status indicator, and does not
support setting such a value.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348967 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-12 20:20:15 +00:00
Michal Gorny
2d1346288e [test] Permit NetBSD in filesystem_dynamic_test_helper.py
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348872 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-11 18:29:35 +00:00
Louis Dionne
682614cc53 [libcxx] Only enable the availability LIT feature when we're testing libc++
Other standard libraries don't implement availability markup, so it doesn't
make sense to e.g. XFAIL tests based on availability markup outside of
libc++.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348871 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-11 18:05:38 +00:00
Louis Dionne
3b06e97b93 [libcxx] Remove the no_default_flags LIT configuration
This is part of an ongoing cleanup of the LIT test suite, where I'm
trying to reduce the number of configuration options. In this case,
the original intent seemed to be running the test suite with libstdc++,
but this is now supported by specifying cxx_stdlib_under_test=libstdc++.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348868 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-11 17:29:55 +00:00
Louis Dionne
2fa05e61c8 [NFC] Fix incorrect (but unreachable) LIT error message
It is unreachable because we test that the cxx_stdlib_under_test is
in the supported set of libraries elsewhere. Furthermore, this code
relied on the `use_stdlib_type`, which is never defined.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@348867 91177308-0d34-0410-b5e6-96231b3b80d8
2018-12-11 17:05:20 +00:00