Skip to content

Commit

Permalink
[libc++][modules] Support using the module std with -fno-char8_t. (#7…
Browse files Browse the repository at this point in the history
…9155)

Exclude some using-declarations in the module purview when compiling
with `-fno-char8_t`.

(cherry picked from commit dc44836)
  • Loading branch information
poyaoc97 authored and llvmbot committed Feb 2, 2024
1 parent 5870743 commit 5f40ce9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libcxx/modules/std/atomic.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ export namespace std {
using std::atomic_char;
using std::atomic_char16_t;
using std::atomic_char32_t;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using std::atomic_char8_t;
#endif
using std::atomic_int;
using std::atomic_llong;
using std::atomic_long;
Expand Down
2 changes: 2 additions & 0 deletions libcxx/modules/std/iosfwd.inc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ export namespace std {
#endif
using std::u16streampos;
using std::u32streampos;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using std::u8streampos;
#endif

using std::basic_osyncstream;
using std::basic_syncbuf;
Expand Down
4 changes: 4 additions & 0 deletions libcxx/modules/std/string.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ export namespace std {
using std::string;
using std::u16string;
using std::u32string;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using std::u8string;
#endif
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wstring;
#endif
Expand All @@ -58,7 +60,9 @@ export namespace std {
using std::pmr::string;
using std::pmr::u16string;
using std::pmr::u32string;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using std::pmr::u8string;
#endif
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::pmr::wstring;
#endif
Expand Down
2 changes: 2 additions & 0 deletions libcxx/modules/std/string_view.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ export namespace std {
using std::string_view;
using std::u16string_view;
using std::u32string_view;
#ifndef _LIBCPP_HAS_NO_CHAR8_T
using std::u8string_view;
#endif
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
using std::wstring_view;
#endif
Expand Down

0 comments on commit 5f40ce9

Please sign in to comment.