diff options
author | Tom Honermann <tom@honermann.net> | 2023-01-25 17:57:15 -0500 |
---|---|---|
committer | Tom Honermann <tom@honermann.net> | 2023-02-02 13:31:19 -0500 |
commit | cf93a3dd512e4912181f05790992c760378c8893 (patch) | |
tree | f3a74907d2c0bda982b348e92a91c2ca5f3a1514 /llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp | |
parent | 2fce90938bb51c5cd091aa3e6383066f96d3a583 (diff) | |
download | llvm-cf93a3dd512e4912181f05790992c760378c8893.zip llvm-cf93a3dd512e4912181f05790992c760378c8893.tar.gz llvm-cf93a3dd512e4912181f05790992c760378c8893.tar.bz2 |
[libc++] Remove use of internal glibc macros to determine if c8rtomb() and mbrtoc8() are present.
When support for declaring the c8rtomb() and mbrtoc8() functions within the
std namespace was added in commit 7e7013c5d4b1b3996c8dba668c5a94bb33b2999b,
internal glibc macros were used to determine if C2X extensions are enabled.
Specifically, a check for whether `__GLIBC_USE` is defined and whether
`__GLIBC_USE(ISOC2X)` is non-0 was added. `__GLIBC_USE` is an internal
detail of the glibc implementation that may be changed or removed in the
future potentially leading to inconsistency or compilation failures. This
change removes the use of the internal glibc macro to avoid such problems.
Unfortunately, without another mechanism to determine if C2X extensions are
enabled, this removal will result in inconsistent declarations of the
c8rtomb() and mbrtoc8() functions; when C++ char8_t support is not enabled, but
C2X extensions are, these functions will be declared in the global namespace
but not in the std namespace. This situation will improve when C23 support
is finalized and the check can be re-implemented using `__STDC_VERSION__`.
Diffstat (limited to 'llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions