File tree 2 files changed +18
-10
lines changed
2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 91
91
# define _LIBCPP_ABI_USE_WRAP_ITER_IN_STD_STRING_VIEW
92
92
// Dont' add an inline namespace for `std::filesystem`
93
93
# define _LIBCPP_ABI_NO_FILESYSTEM_INLINE_NAMESPACE
94
+ // libcxx std::basic_ios uses WEOF to indicate that the fill value is
95
+ // uninitialized. However, on platforms where the size of char_type is
96
+ // equal to or greater than the size of int_type,
97
+ // std::char_traits<char_type>::eq_int_type() cannot distinguish between WEOF
98
+ // and WCHAR_MAX. Helper class _OptionalFill is used for targets where a
99
+ // variable is needed to indicate whether the fill value has been initialized.
100
+ // Existing targets where this would break ABI compatibility can choose to keep
101
+ // the existing ABI by undefining macro _LIBCXX_IOS_MAY_USE_OPTIONAL_FILL.
102
+ # define _LIBCXX_IOS_MAY_USE_OPTIONAL_FILL
94
103
#elif _LIBCPP_ABI_VERSION == 1
95
104
# if !(defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF))
96
105
// Enable compiling copies of now inline methods into the dylib to support
108
117
# if defined(__FreeBSD__) && __FreeBSD__ < 14
109
118
# define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
110
119
# endif
120
+ // AIX and 64-bit MVS must use _OptionalFill for ABI backward compatibility.
121
+ # if defined(_AIX) || (defined(__MVS__) && defined(__64BIT__))
122
+ # define _LIBCXX_IOS_FORCE_OPTIONAL_FILL
123
+ # endif
111
124
#endif
112
125
113
126
// We had some bugs where we use [[no_unique_address]] together with construct_at,
Original file line number Diff line number Diff line change @@ -617,21 +617,16 @@ protected:
617
617
private:
618
618
basic_ostream<char_type, traits_type>* __tie_;
619
619
620
- #if defined(_AIX) || (defined(__MVS__) && defined(__64BIT__))
621
- // AIX and 64-bit MVS must use _OptionalFill for ABI backward compatibility.
620
+ #if defined(_LIBCXX_IOS_FORCE_OPTIONAL_FILL)
622
621
using _FillType = _OptionalFill<_Traits>;
623
- #else
624
- #if defined(_WIN32)
625
- static const bool _OptOutForABICompat = true ;
626
- #else
627
- static const bool _OptOutForABICompat = false ;
628
- #endif
629
-
622
+ #elif defined(_LIBCXX_IOS_MAY_USE_OPTIONAL_FILL)
630
623
using _FillType = _If<
631
- sizeof (char_type) >= sizeof (int_type) && !_OptOutForABICompat ,
624
+ sizeof (char_type) >= sizeof (int_type),
632
625
_OptionalFill<_Traits>,
633
626
_SentinelValueFill<_Traits>
634
627
>;
628
+ #else
629
+ using _FillType = _SentinelValueFill<_Traits>;
635
630
#endif
636
631
mutable _FillType __fill_;
637
632
};
You can’t perform that action at this time.
0 commit comments