llvm-project/libcxx/test
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
..
configs [libcxx] Fix using the vcruntime ABI with _HAS_EXCEPTIONS=0 defined 2022-08-17 21:14:25 +00:00
libcxx [test][libcxx] Don't XFAIL passing test with HWASAN 2022-08-16 09:37:16 -07:00
std [libc++][format] Improve format buffer. 2022-08-16 18:54:10 +02:00
support [test][libc++][hwasan] Handle hwaddress_sanitizer 2022-08-15 13:50:54 -07:00
.clang-tidy [libc++] Add clang-tidy for the tests 2022-07-20 11:26:49 +02:00
CMakeLists.txt [libc++] Re-apply "Always build c++experimental.a"" 2022-07-19 10:44:19 -04:00
lit.cfg.py [libc++] Allow specifying custom Lit config files 2020-06-18 10:06:04 -04:00