diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2024-07-15 09:11:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 10:11:23 -0400 |
commit | ef51e617c43ef4248973f07e0a711f69d85c948c (patch) | |
tree | 0bcf734debe76d878e99adc4dc575818baa68f7a /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 97ebc9794941d9e73792ab9deab7abafaf750a17 (diff) | |
download | llvm-ef51e617c43ef4248973f07e0a711f69d85c948c.zip llvm-ef51e617c43ef4248973f07e0a711f69d85c948c.tar.gz llvm-ef51e617c43ef4248973f07e0a711f69d85c948c.tar.bz2 |
[libc++] Handle _LIBCPP_HAS_NO_{THREADS,LOCALIZATION} consistently with other carve-outs (#98319)
Previously, we would issue an #error when using a header that requires
threading support or localization support in a configuration where that
is disabled. This is unlike what we do for all the other carve outs like
no-filesystem, no-wide-characters or no-random-device. Instead of
issuing an #error, we normally just remove the problematic parts of the
header.
This patch makes the handling of no-localization and no-threads
consistent with the other carve-outs. I dislike the fact that users
won't get an explicit error message when trying to use e.g. ios in a
build that doesn't support localization, but I think it is better to
handle things consistently. Note that besides the consistency argument,
the #error approach doesn't really work anyways since it would break
down if we moved towards assuming the C locale only in the
no-localization mode.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions