[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
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 074d46d55fe27d12af5bdfa880408e93a98e874d
diff --git a/include/module.modulemap b/include/module.modulemap
index b966423..3199d3d 100644
--- a/include/module.modulemap
+++ b/include/module.modulemap
@@ -40,7 +40,13 @@
     }
     // <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"
 /*