[libcxx-commits] [libcxx] a75c9d0 - [NFC][libc++] Moves ios_base's forward declaration. (#88027)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 16 11:18:38 PDT 2024


Author: Mark de Wever
Date: 2024-04-16T20:18:34+02:00
New Revision: a75c9d059791f5d175f6c263d114d59e51b46120

URL: https://github.com/llvm/llvm-project/commit/a75c9d059791f5d175f6c263d114d59e51b46120
DIFF: https://github.com/llvm/llvm-project/commit/a75c9d059791f5d175f6c263d114d59e51b46120.diff

LOG: [NFC][libc++] Moves ios_base's forward declaration. (#88027)

According to our synopsis it belonged to ios_fwd. This is not true in
the C++11 version of the Standard, I did not validate against C++98.

Moving this to ios's forward where it's declared in the standard allows
removing a module quirk. An earlier removal of std::vectors forward
declaration allows to remove all quirks for the iosfwd module part.

Since iosfwd includes __fwd/ios.h this does not change the required
includes.

Added: 
    

Modified: 
    libcxx/include/__fwd/ios.h
    libcxx/include/iosfwd
    libcxx/utils/libcxx/test/modules.py

Removed: 
    


################################################################################
diff  --git a/libcxx/include/__fwd/ios.h b/libcxx/include/__fwd/ios.h
index 82c865d58cc751..48350709d4ce25 100644
--- a/libcxx/include/__fwd/ios.h
+++ b/libcxx/include/__fwd/ios.h
@@ -18,6 +18,8 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
+class _LIBCPP_EXPORTED_FROM_ABI ios_base;
+
 template <class _CharT, class _Traits = char_traits<_CharT> >
 class _LIBCPP_TEMPLATE_VIS basic_ios;
 

diff  --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index 9af5e05031850d..2481667dd972cf 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -25,7 +25,6 @@ template<>            struct char_traits<wchar_t>;
 
 template<class T>     class allocator;
 
-class ios_base;
 template <class charT, class traits = char_traits<charT> > class basic_ios;
 
 template <class charT, class traits = char_traits<charT> > class basic_streambuf;
@@ -124,8 +123,6 @@ using wosyncstream = basic_osyncstream<wchar_t>;  // C++20
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_EXPORTED_FROM_ABI ios_base;
-
 template <class _CharT, class _Traits = char_traits<_CharT> >
 class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
 template <class _CharT, class _Traits = char_traits<_CharT> >

diff  --git a/libcxx/utils/libcxx/test/modules.py b/libcxx/utils/libcxx/test/modules.py
index 3f3c7999a1a21d..44c6292ff1140f 100644
--- a/libcxx/utils/libcxx/test/modules.py
+++ b/libcxx/utils/libcxx/test/modules.py
@@ -26,8 +26,6 @@
 # The operators are added for private types like __iom_t10.
 SkipDeclarations["iomanip"] = ["std::operator<<", "std::operator>>"]
 
-SkipDeclarations["iosfwd"] = ["std::ios_base", "std::vector"]
-
 # This header also provides declarations in the namespace that might be
 # an error.
 SkipDeclarations["filesystem"] = [


        


More information about the libcxx-commits mailing list