[libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_E...
authorIan Anderson <iana@apple.com>
Wed, 23 Aug 2023 20:52:18 +0000 (13:52 -0700)
committerTobias Hieta <tobias@hieta.se>
Sun, 27 Aug 2023 08:55:37 +0000 (10:55 +0200)
commit2641da8e1057d943b79bc4ea906ee6804ea9dace
tree4cf308871d21cd25f0ce5ce260c78677c50a4cca
parent4114813bf2fe23f4be34633037230e7a2ec22701
[libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined

When `__locale_dir/locale_base_api/locale_guard.h is` compiled independently, as it is when it's in its own clang module, it fails to compile due to `locale_t` being undefined. It needs to include `__locale` to get that, instead of just `clocale`.

Reviewed By: ldionne, #libc

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

(cherry picked from commit 6021c78fe55e3c4d3e073710bfe279c6a28566d4)
libcxx/include/__locale_dir/locale_base_api/locale_guard.h