Commit Graph

14 Commits

Author SHA1 Message Date
Eric Fiselier ca648c9787 Add module definitions for string_view
llvm-svn: 288733
2016-12-05 23:53:23 +00:00
Eric Fiselier 392aa10811 Add modules for any/optional/variant
llvm-svn: 288730
2016-12-05 23:33:19 +00:00
Eric Fiselier daf21c3f69 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.
llvm-svn: 288728
2016-12-05 23:16:07 +00:00
Eric Fiselier 198955536e 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.

llvm-svn: 287693
2016-11-22 20:15:39 +00:00
Eric Fiselier 7216b6bc38 Attempt to fix stdint/cstdint modules try 2
llvm-svn: 287690
2016-11-22 20:05:19 +00:00
Eric Fiselier 3028189ee3 Cleanup module.modulemap
llvm-svn: 287687
2016-11-22 20:00:21 +00:00
Eric Fiselier 67a7e935a3 Revert r287435 because of OS X test failures
llvm-svn: 287531
2016-11-21 11:26:10 +00:00
Eric Fiselier 72d302b9ed Fix stdint/cstdint modules
llvm-svn: 287435
2016-11-19 03:29:03 +00:00
Eric Fiselier 074d46d55f [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

llvm-svn: 287413
2016-11-19 01:14:15 +00:00
Bruno Cardoso Lopes 81440dc93f [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!

llvm-svn: 284801
2016-10-21 03:14:27 +00:00
Richard Smith d3a7bfcde5 Remove __config module to avoid #include cycle when libc headers include libc++'s <foo.h> headers.
llvm-svn: 250236
2015-10-13 22:13:33 +00:00
Saleem Abdulrasool 8e5ce33193 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.

llvm-svn: 229162
2015-02-13 22:15:32 +00:00
Nico Weber 28d692d30e 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?)

llvm-svn: 218372
2014-09-24 04:44:54 +00:00
Richard Smith 80fd10e6e1 [modules] Add initial module map for libc++.
llvm-svn: 209265
2014-05-21 00:33:49 +00:00