[libcxx] Allow using thread safety annotations in MinGW mode

These were omitted in all Windows configurations, but it turns out
that they work just fine in MinGW mode.

This allows converting a couple cases of "XFAIL: LIBCXX-WINDOWS-FIXME"
into "XFAIL: msvc" as the bug is specific to MSVC mode (clang-cl).

Differential Revision: https://reviews.llvm.org/D118192
This commit is contained in:
Martin Storsjö 2022-01-11 09:23:39 +00:00
parent 5b79d5acdb
commit de5d38ef2d
5 changed files with 7 additions and 6 deletions

View File

@ -1258,8 +1258,9 @@ extern "C" _LIBCPP_FUNC_VIS void __sanitizer_annotate_contiguous_container(
# if defined(__clang__) && __has_attribute(acquire_capability)
// Work around the attribute handling in clang. When both __declspec and
// __attribute__ are present, the processing goes awry preventing the definition
// of the types.
# if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
// of the types. In MinGW mode, __declspec evaluates to __attribute__, and thus
// combining the two does work.
# if !defined(_MSC_VER)
# define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
# endif
# endif

View File

@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
// XFAIL: LIBCXX-WINDOWS-FIXME
// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety

View File

@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
// XFAIL: LIBCXX-WINDOWS-FIXME
// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety

View File

@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
// XFAIL: LIBCXX-WINDOWS-FIXME
// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety

View File

@ -8,7 +8,7 @@
// On Windows Clang bugs out when both __declspec and __attribute__ are present,
// the processing goes awry preventing the definition of the types.
// XFAIL: LIBCXX-WINDOWS-FIXME
// XFAIL: msvc
// UNSUPPORTED: libcpp-has-no-threads
// REQUIRES: thread-safety