Skip to content

[libc++] Removes a Clang 16 Windows workaround. #88560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 8 additions & 16 deletions libcxx/include/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,6 @@ typedef basic_stringstream<wchar_t> wstringstream;
_LIBCPP_PUSH_MACROS
#include <__undef_macros>

// TODO(LLVM-19): Remove this once we drop support for Clang 16,
// which had this bug: https://github.com/llvm/llvm-project/issues/40363
#ifdef _WIN32
# define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_ALWAYS_INLINE
#else
# define _LIBCPP_HIDE_FROM_ABI_SSTREAM _LIBCPP_HIDE_FROM_ABI
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

// Class template basic_stringbuf [stringbuf]
Expand Down Expand Up @@ -460,9 +452,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
string_type str() const;
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return str(__str_.get_allocator()); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return str(__str_.get_allocator()); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && {
_LIBCPP_HIDE_FROM_ABI string_type str() && {
const basic_string_view<_CharT, _Traits> __view = view();
typename string_type::size_type __pos = __view.empty() ? 0 : __view.data() - __str_.data();
// In C++23, this is just string_type(std::move(__str_), __pos, __view.size(), __str_.get_allocator());
Expand Down Expand Up @@ -948,9 +940,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down Expand Up @@ -1085,9 +1077,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down Expand Up @@ -1225,9 +1217,9 @@ public:
#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_BUILDING_LIBRARY)
_LIBCPP_HIDE_FROM_ABI string_type str() const { return __sb_.str(); }
#else
_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() const& { return __sb_.str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() const& { return __sb_.str(); }

_LIBCPP_HIDE_FROM_ABI_SSTREAM string_type str() && { return std::move(__sb_).str(); }
_LIBCPP_HIDE_FROM_ABI string_type str() && { return std::move(__sb_).str(); }
#endif

#if _LIBCPP_STD_VER >= 20
Expand Down