[libcxx] Implement locale.h to fix modules build
authorEric Fiselier <eric@efcs.ca>
Sat, 19 Nov 2016 01:14:15 +0000 (01:14 +0000)
committerEric Fiselier <eric@efcs.ca>
Sat, 19 Nov 2016 01:14:15 +0000 (01:14 +0000)
commit074d46d55fe27d12af5bdfa880408e93a98e874d
treeec3a5f8e0ddaba7ac50cac58b01d68e9b4dba3b3
parent72f4997cbfb542f33da45cbc01d7a2e1bd26b3c8
[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
libcxx/include/locale.h [new file with mode: 0644]
libcxx/include/module.modulemap
libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp [new file with mode: 0644]
libcxx/test/libcxx/modules/clocale_exports.sh.cpp [new file with mode: 0644]
libcxx/test/libcxx/test/config.py