[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
This commit is contained in:
Eric Fiselier
2016-11-19 01:14:15 +00:00
parent 2917004aed
commit 850745db9e
5 changed files with 128 additions and 1 deletions

View File

@@ -40,7 +40,13 @@ module std [system] {
}
// <iso646.h> provided by compiler.
// <limits.h> provided by compiler or C library.
// <locale.h> provided by C library.
module locale_h {
header "locale.h"
/*
export_macros LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY LC_NUMERIC LC_TIME
*/
export *
}
module math_h {
header "math.h"
/*