Commit Graph

4099 Commits

Author SHA1 Message Date
Casey Carter
d252306885 [test] variant: enable constexpr construction tests on MSVC STL
* Add a new macro _MSVC_STL_VER to detect when the MSVC STL is being tested
* Workaround C1XX __is_trivially_copyable bug

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302158 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 15:32:54 +00:00
Eric Fiselier
474dfc389d Fix incorrect usage of __libcpp_mutex_trylock. Patch from Andrey Khalyavin
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302129 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 07:45:09 +00:00
Eric Fiselier
b8577430ea Update Appveyor bot link to point to new llvm-mirror Appveyor account
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302128 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 07:40:23 +00:00
Eric Fiselier
74abe0b15f test commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302122 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 06:28:34 +00:00
Eric Fiselier
7d96f16173 test commit
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302120 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 06:27:06 +00:00
Jonas Hahnfeld
f77a7df6f2 [libcxx][CMake] Set library dir when built under runtimes/
This will put libraries into the build root's lib/ directory by default.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302117 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 06:02:50 +00:00
Eric Fiselier
3c51b64ddc update buildbot doc to link to the new Appveyor builders
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302116 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 05:58:59 +00:00
Eric Fiselier
58291566ed Attempt to enable the LIT progress bar on Appveyor
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302115 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 05:32:54 +00:00
Eric Fiselier
a64f7198c7 Setup Appveyor bot for MSVC 2017 and MSVC 2015
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302113 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 05:16:48 +00:00
Stephan T. Lavavej
559442652c [libcxx] [test] Strip trailing whitespace. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302105 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:43:58 +00:00
Stephan T. Lavavej
bd0685fed0 [libcxx] [test] In msvc_stdlib_force_include.hpp, use _HAS_CXX17 to set TEST_STD_VER.
_HAS_CXX17 indicates whether MSVC's STL is in C++17 mode.

In MSVC there's a distinction between CRT headers like stdlib.h and STL headers
like cstdlib. Only the STL headers drag in yvals.h, our internal STL-wide header
that defines internal macros like _HAS_CXX17.

_HAS_CXX17 is an MSVC STL library macro, unconditionally defined. We centralize
everything on this, because we have to ask different questions to determine
whether C1XX, EDG, or Clang is in 14 or 17 mode, and we additionally permit
users to override the detection in one way (it's okay to ask for 17 from the
compiler, but only 14 from the libs, at least for the moment; only noexcept
in the type system will give us a headache).

As this header is for testing MSVC's STL, we can assume _HAS_CXX17 is defined.

Fixes D32726.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302104 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:35:11 +00:00
Eric Fiselier
f3b2962c72 Attempt to escape paths correctly
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302102 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:17:22 +00:00
Eric Fiselier
8677b63a2c Attempt to setup MSVC 2017
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302101 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:17:21 +00:00
Eric Fiselier
83e040ffab Use nullptr instead of the literal 0
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302100 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:06:56 +00:00
Eric Fiselier
ca57b1475e Fix macro redefinition warnings for _LIBCPP_NO_RTTI
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302099 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 01:06:54 +00:00
Eric Fiselier
621612c845 Test commit for Appveyor - Remove incorrect caching logic
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302097 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-04 00:16:35 +00:00
Duncan P. N. Exon Smith
59a094fac7 CMake: Only add test/ subdirectory when it exists
r296685 started adding the test/ subdirectory even when
LIBCXX_INCLUDE_TESTS=OFF.  This is great for testing libcxx standalone,
but it also breaks the build when the test/ subdirectory is removed
(and our submission system strips all test/ directories).

This patch updates the logic to check for test/ before adding it.

rdar://problem/31931366

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302095 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 23:33:54 +00:00
Eric Fiselier
16d4a3f21c Attempt to fix appveyor build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302084 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 21:14:26 +00:00
Eric Fiselier
6cff9cfbcc Qualify calls to __invoke, __apply_fuctor, and __mu
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@302082 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-03 21:02:19 +00:00
Justin Lebar
57c405955f Add missing acquire_load to call_once overload.
Summary: Seemed to have been overlooked in D24028.

This bug was found and brought to my attention by Paul Wankadia.

Reviewers: kubamracek, EricWF, dvyukov

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@301132 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-23 16:58:48 +00:00
Duncan P. N. Exon Smith
5df171df50 cmath: Skip Libc for integral types in isinf, etc.
For std::isinf, the standard requires effectively calling isinf as
double from Libc for integral types. But integral types are never
infinite; we don't need to call Libc to return false.

Also short-circuit other functions where Libc won't have interesting
answers: signbit, fpclassify, isfinite, isnan, and isnormal.

I added correctness tests for integral types since we're no longer
deferring to Libc.

In review it was pointed out that in future revisions of the C++
standard we may add more types to std::is_arithmetic (e.g.,
std::is_fixed_point).  I'll leave it to a future commit to hack this to
allow using math functions on those.  We'll need to change things like
__libcpp_fpclassify anyway, so I'm not sure anything here would really
be future-proof.

https://reviews.llvm.org/D31561
rdar://problem/31361223

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@301060 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 23:14:55 +00:00
Casey Carter
fba865a217 Expand test coverage for LWG2857
* Cover optional's emplace-from-initializer_list overload

* Verify that any::emplace and optional::emplace return a reference to the correct type even for throwing cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@301055 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 22:38:59 +00:00
Eric Fiselier
9f6e23c7c9 update XFAIL comments with more details
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300944 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 03:09:40 +00:00
Eric Fiselier
c0574ee051 Mark exception_ptr tests as XFAIL on Windows for now
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300942 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 02:13:33 +00:00
Eric Fiselier
c94dd0a571 XFAIL Windows test failures under test/libcxx
This patch XFAIL's a number of tests under test/libcxx when on Windows.
These failures need more investigation or patches to either Clang or libc++
but for now we don't want them to prevent the bot from going green.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300941 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 01:48:02 +00:00
Billy Robert O'Neal III
aa22e515ac Resolve unused local typedef warning in test.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300937 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 01:10:04 +00:00
Eric Fiselier
b34376320f Fix 'verify-support' available feature
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300934 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-21 00:43:07 +00:00
Shoaib Meenai
3d1d1eab22 [libc++] Default to vcruntime when targeting MSVC
Summary:
libc++abi is never the right option for LIBCXX_TARGETING_MSVC, since it
targets the Itanium ABI, whereas MSVC uses the Microsoft ABI. Make the
default ABI be vcruntime when targeting MSVC even if libc++abi is
present in the tree.

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300921 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 23:33:49 +00:00
Eric Fiselier
a67beb7b94 Fix ATOMIC_<TYPE>_LOCK_FREE macros on Windows.
Previously the ATOMIC_<TYPE>_LOCK_FREE macros were implemented
using __GCC_ATOMIC_<TYPE>_LOCK_FREE but GCC specific macros
are defined when -fms-compatibility is specified.

To avoid this Libc++ now tries to use the newly added
__CLANG_ATOMIC_<TYPE>_LOCK_FREE macros instead, and only falls
back to the GCC versions when the Clang ones aren't available.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300920 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 23:22:46 +00:00
Eric Fiselier
6ca6874880 Fix comment and remove incorrect linker flags in test configuration
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300881 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 20:22:19 +00:00
Eric Fiselier
5bf8bed958 Disable the filesystem library on Windows by default
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 04:24:29 +00:00
Eric Fiselier
23ccaa54dc Rename the static version of libc++ on Windows.
Previously both the static version of libc++ and the
import library for the DLL had the same name, 'c++.lib'.

This patch renames the static library on Windows to be `libc++.lib`
so it no longer conflicts. This naming convention is consistent with
other windows libraries.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300817 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 04:19:02 +00:00
Eric Fiselier
b105246262 Make linker errors verbose on Windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300809 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 01:50:39 +00:00
Eric Fiselier
47c3219d73 Fix dllimport on a class template
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300808 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-20 01:45:15 +00:00
Eric Fiselier
02213ed1e1 change what branches Appveyor builds
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300788 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 23:27:48 +00:00
Eric Fiselier
a5ca9445f6 Add appveyor.yml config for a future Windows bot.
I'm currently trying to get a libc++ Windows builder working on appveyor.
This patch adds the configuration file needed to build libc++ on Appveyor.
Details of where the buildbot can be found will come later

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300786 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 23:26:21 +00:00
Eric Fiselier
04f2896e85 Fix typo in Windows test configuration code
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300770 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 21:52:08 +00:00
Shoaib Meenai
2d282d7e6d [libc++] Use _LIBCPP_ABI_MICROSOFT instead of _MSC_VER
_LIBCPP_ABI_MICROSOFT is more appropriate to use here, since the
conditionals are controlling Microsoft mangling. It wasn't used
originally since it didn't exist at the time.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300743 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 20:11:04 +00:00
Eric Fiselier
fbca5e0547 Fix tests for extended noexcept in the container adaptors tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300652 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 02:07:12 +00:00
Eric Fiselier
2c4b8af9aa Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <exception>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300649 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:35:58 +00:00
Eric Fiselier
aa55cef64a Cleanup usages of _LIBCPP_HAS_NO_<c++11-feature> in <bitset>, <ios>, <locale>, and <iterator>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300648 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:34:08 +00:00
Eric Fiselier
ec0df99de4 Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in the functional library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300646 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:28:47 +00:00
Eric Fiselier
191f075c6f Cleanup remaining usages of _LIBCPP_HAS_NO_<c++11-feature> in tuple and utility
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300644 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:23:39 +00:00
Eric Fiselier
5875c1d527 Cleanup remaining _LIBCPP_HAS_NO_<c++11-feature> usages in container headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300643 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:23:04 +00:00
Eric Fiselier
869c5adc90 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in support headers and final tests
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300637 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 01:02:49 +00:00
Eric Fiselier
d311b3c55a Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the utilities library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300635 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 00:56:32 +00:00
Eric Fiselier
3e92897754 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the string library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300633 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 00:28:44 +00:00
Eric Fiselier
97db517a49 Cleanup _LIBCPP_HAS_NO_<c++11-feature> macros in the numeric tests and headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300632 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-19 00:23:45 +00:00
Eric Fiselier
d89c715f29 Cleanup _LIBCPP_HAS_NO_<c++11-features> macro usage in regex
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300627 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18 23:42:15 +00:00
Eric Fiselier
e915b5c1f2 Cleanup _LIBCPP_HAS_NO_<c++11-feature> in the input.output library
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@300626 91177308-0d34-0410-b5e6-96231b3b80d8
2017-04-18 23:38:41 +00:00