Commit Graph

31 Commits

Author SHA1 Message Date
Marshall Clow
31810d9c0b Remove more of the std::experimental bits that are now in std::. All the _v type aliases, conjunction/disjunction, apply, etc. See https://libcxx.llvm.org/TS_deprecation.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324423 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-06 23:13:48 +00:00
Marshall Clow
b50d2443d5 Remove <experimental/string_view>; use <string_view> instead. See https://libcxx.llvm.org/TS_deprecation.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@324290 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-05 23:43:34 +00:00
Marshall Clow
14698bce22 Remove <experimental/numeric>; use <numeric> instead. See https://libcxx.llvm.org/TS_deprecation.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323975 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 15:49:27 +00:00
Marshall Clow
f8d223fe63 Remove <experimental/any>; use <any> instead. See https://libcxx.llvm.org/TS_deprecation.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323972 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 15:21:14 +00:00
Marshall Clow
95db3d2871 Remove <experimental/optional>; use <optional> instead. See https://libcxx.llvm.org/TS_deprecation.html
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@323971 91177308-0d34-0410-b5e6-96231b3b80d8
2018-02-01 14:54:25 +00:00
Eric Fiselier
018a3d51a4 [Libc++] Use #pragma push_macro/pop_macro to better handle min/max on Windows
Summary:
This patch improves how libc++ handles min/max macros within the headers. Previously libc++ would undef them and emit a warning.
This patch changes libc++ to use `#pragma push_macro`  to save the macro before undefining it, and `#pragma pop_macro` to restore the macros and the end of the header.

Reviewers: mclow.lists, bcraig, compnerd, EricWF

Reviewed By: EricWF

Subscribers: cfe-commits, krytarowski

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304357 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-31 22:07:49 +00:00
Eric Fiselier
fecf2a493b Add missing 'requires coroutines' to module map
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@304180 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-29 23:17:28 +00:00
Eric Fiselier
b3559ed0d6 Re-add <experimental/coroutine> to the module map.
The original issues were caused because <experimental/coroutine>
didn't correctly #ifdef out enough of the header, which caused incomplete
types to be used.

This patch fixes the `#if defined(__cpp_coroutines)` guard and re-adds
the headers to the module map.

It also uglifies some incorrectly non-reserved names.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303936 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 23:39:29 +00:00
Eric Fiselier
eb6bf87030 Remove <experimental/coroutine> from the module map for now. It doesn't work unless modules are enabled
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303838 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 05:30:05 +00:00
Eric Fiselier
737c3bf25e Add <experimental/coroutine>
This patch adds the library portions of the coroutines PDTS,
which should now be supported by Clang.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@303836 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 04:36:24 +00:00
Eric Fiselier
32b19c3d9f [libc++] Tolerate presence of __deallocate macro
Summary:
On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK.

This patch renames all usages of `__deallocate` internally as to not conflict with the macro.

Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@291332 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-07 03:01:24 +00:00
Eric Fiselier
183fafa507 Fix _LIBCPP_VERSION tests with modules on Darwin
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@289028 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-08 06:37:41 +00:00
Eric Fiselier
a683dc04e1 Revert r288787: Add missing stdbool.h module.
Reverting because I didn't properly test this patch. Although it's probably
correct to add a stdbool_h module I thought the change fixed more than it did.
I'll re-commit after more investigation.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 09:48:32 +00:00
Eric Fiselier
1d801988a7 Add missing stdbool.h module. The test suite now passes on OS X with modules
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 09:41:50 +00:00
Eric Fiselier
7a6fabad1c Fix stdio module build on OS X
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 07:40:46 +00:00
Eric Fiselier
74c9d6aa0d Fix C++03 modules build
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-06 01:34:24 +00:00
Eric Fiselier
7ba695e32c Add module definitions for <experimental/foo> headers
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288735 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 23:55:34 +00:00
Eric Fiselier
72a5c771b8 Add module definitions for string_view
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 23:53:23 +00:00
Eric Fiselier
045b27e848 Add modules for any/optional/variant
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 23:33:19 +00:00
Eric Fiselier
bca6de0e4e Adjust libc++ test infastructure to fully support modules
This patch overhalls the libc++ test format/configuration in order to fully support modules. By "fully support" I mean get almost all of the tests passing. The main hurdle for doing this is handling tests that `#define _LIBCPP_FOO` macros to test a different configuration. This patch deals with these tests in the following ways:

1. For tests that define single `_LIBCPP_ABI_FOO` macros have been annotated with `// MODULES_DEFINES: _LIBCPP_ABI_FOO`. This allows the test suite to define the macro on the command line so it uses a different set of modules.
2. Tests for libc++'s debug mode (which define custom `_LIBCPP_ASSERT`) are automatically detected by the test suite and are compiled and run with modules disabled.

This patch also cleans up how the `CXXCompiler` helper class handles enabling/disabling language features.

NOTE: This patch uses `LIT` features which were only committed to LLVM today. If this patch breaks running the libc++ tests you probably need to update LLVM.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@288728 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-05 23:16:07 +00:00
Eric Fiselier
fb6164cdad Allow libc++ to use modules in C++03.
Libc++ internal uses <atomic> in C++03 code but the module map forbids its use.
This causes the libc++ 'std' module to fail to build in C++03.

This patch removes the requirement to fix this issue.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287693 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22 20:15:39 +00:00
Eric Fiselier
6010dc84c6 Attempt to fix stdint/cstdint modules try 2
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22 20:05:19 +00:00
Eric Fiselier
faa8312d51 Cleanup module.modulemap
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-22 20:00:21 +00:00
Eric Fiselier
8b4cb5ba98 Revert r287435 because of OS X test failures
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-21 11:26:10 +00:00
Eric Fiselier
6f7f0b8530 Fix stdint/cstdint modules
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 03:29:03 +00:00
Eric Fiselier
850745db9e [libcxx] Implement locale.h to fix modules build
Summary:
Because `locale.h` isn't part of the libc++ modules the class definitions it provides are exported as part of `__locale` (since it happens to be build first). This breaks `<clocale>` which exports `std::lconv` without including `<__locale>`.

This patch implements `locale.h` to fix this issue, it also adds support for testing libc++ with modules.




Reviewers: mclow.lists, rsmith, EricWF

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@287413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-11-19 01:14:15 +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
Richard Smith
44d1476b6d Remove __config module to avoid #include cycle when libc headers include libc++'s <foo.h> headers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250236 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-13 22:13:33 +00:00
Saleem Abdulrasool
f1b30c41ad Handle function name conflicts in _LIBCPP_MSVCRT mode
Visual Studio's SAL extension uses a macro named __deallocate. This macro is
used pervasively, and gets included through various different ways. This
conflicts with the similarly named interfaces in libc++. Introduce a undef
header similar to __undef_min_max to handle this. This fixes a number of errors
due to the macro replacing the function name.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@229162 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-13 22:15:32 +00:00
Nico Weber
8758796fc9 Mark module atomic as cplusplus11.
With clang, the header atomic requires __has_feature(cxx_atomic), which is only
true in c++11 mode. Because of this, when using modules in c++98 with libc++
compilation of the std module would fail without this change, PR21002.

(With gcc, only gcc4.7+ is needed, no c++11. But gcc doesn't have modules yet,
and the module.modulemap language can't express things like "this is only
required if the compiler is clang". If gcc gets module support, we'd probably
have a module.modulemap file for each compiler that libc++ supports?)


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@218372 91177308-0d34-0410-b5e6-96231b3b80d8
2014-09-24 04:44:54 +00:00
Richard Smith
f33ffcc651 [modules] Add initial module map for libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@209265 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-21 00:33:49 +00:00