llvm-project/libcxx
Paul Kirth 56a34451e1 [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined
_HAS_EXCEPTIONS=0 allows disabling the exception parts of the MS STL
and vcruntime, and e.g. compiler-rt/lib/fuzzer sets this define (to
work around issues with MS STL). If using libc++ instead of MS STL,
this define previously broke the libc++ headers.

If _HAS_EXCEPTIONS is set to 0, the vcruntime_exception.h header
doesn't define the ABI base class std::exception. If no exceptions
are going to be thrown, this probably is fine (although it also
breaks using subclasses of it as regular objects that aren't thrown),
but it requires ifdeffing out all subclasses of all exception/error
derived objects (which are sprinkled throughout the headers).

Instead, libc++ will supply an ABI compatible definition when
_HAS_EXCEPTIONS is set to 0, which will make the class hierarchies
complete.

In this build configuration, one can still create instances of
exception subclasses, and those objects will be ABI incompatible
with the ones from when _HAS_EXCEPTIONS isn't defined to 0 - but
one may argue that's a pathological/self-imposed problem in that case.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D103947
2022-08-17 21:14:25 +00:00
..
benchmarks [libc++] Implements Unicode grapheme clustering 2022-07-20 18:38:32 +02:00
cmake [libc++] Simplify how we define the linker script for libc++ 2022-08-03 09:29:50 -04:00
docs [libcxx][spaceship][doc] Repair links and clean up spaceship progress doc 2022-08-17 12:14:32 -07:00
include [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined 2022-08-17 21:14:25 +00:00
lib [libc++] Rename __libcpp_assertion_handler to __libcpp_verbose_abort 2022-07-29 13:52:42 -04:00
src [libc++] Simplify how we define the linker script for libc++ 2022-08-03 09:29:50 -04:00
test [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined 2022-08-17 21:14:25 +00:00
utils [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined 2022-08-17 21:14:25 +00:00
.clang-format [libc++] Fix merge-conflict in .clang-format 2022-07-28 10:32:02 +02:00
.clang-tidy [libc++] Make parameter names consistent and enforce the naming style using readability-identifier-naming 2022-07-08 18:17:47 +02:00
.gitignore
CMakeLists.txt Enable -Wctad-maybe-unsupported in LLVM build 2022-08-15 23:28:51 +00:00
CREDITS.TXT Microsoft's floating-point to_chars powered by Ryu and Ryu Printf 2021-12-12 16:34:50 +01:00
LICENSE.TXT
TODO.TXT [libc++] Disallow volatile types in std::allocator 2021-09-22 11:47:38 -04:00
appveyor-reqs-install.cmd
appveyor.yml [libc++] Re-apply "Always build c++experimental.a"" 2022-07-19 10:44:19 -04:00