Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[libc++] Remove ios_base::__xindex_ from the ABI#198994

Merged
philnik777 merged 1 commit into
llvm:mainfrom
philnik777:remove_xindex_from_abi
Jun 4, 2026
Merged

[libc++] Remove ios_base::__xindex_ from the ABI#198994
philnik777 merged 1 commit into
llvm:mainfrom
philnik777:remove_xindex_from_abi

Conversation

@philnik777
Copy link
Copy Markdown
Contributor

@philnik777 philnik777 commented May 21, 2026

__xindex_ is only ever used from the dylib from a single function. We can simplify the code a bit by making the variable function-local and avoiding exposing it to the ABI at all. This also fixes a TODO about whether it's safe to use atomic with the GCC ABI: yes, since it's not actually part of our ABI.

@philnik777 philnik777 force-pushed the remove_xindex_from_abi branch 4 times, most recently from 7f8bc6d to 5b8acdb Compare May 26, 2026 15:14
@philnik777 philnik777 force-pushed the remove_xindex_from_abi branch from 5b8acdb to 3134edf Compare May 29, 2026 07:51
@philnik777 philnik777 marked this pull request as ready for review May 31, 2026 18:18
@philnik777 philnik777 requested a review from a team as a code owner May 31, 2026 18:18
@llvmorg-github-actions llvmorg-github-actions Bot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 31, 2026
@llvmorg-github-actions
Copy link
Copy Markdown

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

__xindex_ is only ever used from the dylib from a single function. We can simplify the code a bit by making the variable function-local and avoiding exposing it to the ABI at all. This also fixes a TODO about whether it's safe to use atomic with the GCC ABI: yes, since it's not actually part of our ABI.


Full diff: https://github.com/llvm/llvm-project/pull/198994.diff

12 Files Affected:

  • (modified) libcxx/include/ios (+5-11)
  • (modified) libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist (-1)
  • (modified) libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist (-1)
  • (modified) libcxx/src/ios.cpp (+5-8)
  • (modified) libcxx/test/libcxx/transitive_includes/cxx26.csv (-28)
diff --git a/libcxx/include/ios b/libcxx/include/ios
index d1ec14cba37d1..945fd68643a7a 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -235,10 +235,6 @@ storage-class-specifier const error_category& iostream_category() noexcept;
 #    include <__verbose_abort>
 #    include <version>
 
-#    if _LIBCPP_HAS_ATOMIC_HEADER
-#      include <__atomic/atomic.h> // for __xindex_
-#    endif
-
 #    if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #      pragma GCC system_header
 #    endif
@@ -406,13 +402,6 @@ private:
   int* __index_;
   size_t __event_size_;
   size_t __event_cap_;
-// TODO(EricWF): Enable this for both Clang and GCC. Currently it is only
-// enabled with clang.
-#    if _LIBCPP_HAS_C_ATOMIC_IMP && _LIBCPP_HAS_THREADS
-  static atomic<int> __xindex_;
-#    else
-  static int __xindex_;
-#    endif
   long* __iarray_;
   size_t __iarray_size_;
   size_t __iarray_cap_;
@@ -886,6 +875,11 @@ _LIBCPP_POP_MACROS
 
 #  endif // _LIBCPP_HAS_LOCALIZATION
 
+#  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23
+#    include <ctime>
+#    include <ratio>
+#  endif
+
 #  if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
 #    include <atomic>
 #    include <concepts>
diff --git a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
index da1e340b1d4aa..d1fd0cef6b774 100644
--- a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1869,7 +1869,6 @@
 {'is_defined': True, 'name': '__ZNSt3__18ios_base7unitbufE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base8internalE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base8showbaseE', 'size': 0, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '__ZNSt3__18ios_base9__xindex_E', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9basefieldE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9boolalphaE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9showpointE', 'size': 0, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
index 814fa26349b3d..b0cd73f9a6bfe 100644
--- a/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/i686-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1507,7 +1507,6 @@
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base8internalE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
index c4b8a79985be5..85c5839dd7c8e 100644
--- a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -826,7 +826,6 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
index 8daf957e6e55f..a4dfab8897962 100644
--- a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -826,7 +826,6 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'storage_mapping_class': 'RW', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
index 281f2f374b78f..d14fa14a19bbd 100644
--- a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1859,7 +1859,6 @@
 {'is_defined': True, 'name': '__ZNSt3__18ios_base7unitbufE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base8internalE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base8showbaseE', 'size': 0, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '__ZNSt3__18ios_base9__xindex_E', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9basefieldE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9boolalphaE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__18ios_base9showpointE', 'size': 0, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
index 975d7ae118bf5..b2ca72e70b08d 100644
--- a/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-linux-android23.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1507,7 +1507,6 @@
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base8internalE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt6__ndk18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist
index b27dab3d9203e..85fcda288daa2 100644
--- a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1519,7 +1519,6 @@
 {'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
index e5372de54c40e..669930a06a6db 100644
--- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1518,7 +1518,6 @@
 {'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'}
diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
index 4def06bc737ce..2e897e689db5b 100644
--- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
@@ -1489,7 +1489,6 @@
 {'is_defined': True, 'name': '_ZNSt3__18ios_base7unitbufE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8internalE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base8showbaseE', 'size': 4, 'type': 'OBJECT'}
-{'is_defined': True, 'name': '_ZNSt3__18ios_base9__xindex_E', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9basefieldE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9boolalphaE', 'size': 4, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__18ios_base9showpointE', 'size': 4, 'type': 'OBJECT'}
diff --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp
index 3a8147a0f9d13..2e049098740dc 100644
--- a/libcxx/src/ios.cpp
+++ b/libcxx/src/ios.cpp
@@ -9,6 +9,7 @@
 #include <__config>
 #include <__locale>
 #include <algorithm>
+#include <atomic>
 #include <ios>
 #include <limits>
 #include <memory>
@@ -111,13 +112,6 @@ locale ios_base::imbue(const locale& newloc) {
 
 locale ios_base::getloc() const { return __loc_; }
 
-// xalloc
-#if _LIBCPP_HAS_C_ATOMIC_IMP && _LIBCPP_HAS_THREADS
-atomic<int> ios_base::__xindex_{0};
-#else
-int ios_base::__xindex_ = 0;
-#endif
-
 template <typename _Tp>
 static size_t __ios_new_cap(size_t __req_size, size_t __current_cap) { // Precondition: __req_size > __current_cap
   const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
@@ -127,7 +121,10 @@ static size_t __ios_new_cap(size_t __req_size, size_t __current_cap) { // Precon
     return mx;
 }
 
-int ios_base::xalloc() { return __xindex_++; }
+int ios_base::xalloc() {
+  constinit static atomic<int> xindex = 0;
+  return xindex++;
+}
 
 long& ios_base::iword(int index) {
   size_t req_size = static_cast<size_t>(index) + 1;
diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv
index 253cf64703076..f075a9c741105 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx26.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv
@@ -72,7 +72,6 @@ ccomplex cstdint
 ccomplex cstdio
 ccomplex cstdlib
 ccomplex cstring
-ccomplex ctime
 ccomplex cwchar
 ccomplex cwctype
 ccomplex initializer_list
@@ -80,7 +79,6 @@ ccomplex ios
 ccomplex iosfwd
 ccomplex istream
 ccomplex limits
-ccomplex ratio
 ccomplex sstream
 ccomplex stdexcept
 ccomplex streambuf
@@ -165,7 +163,6 @@ complex cstdint
 complex cstdio
 complex cstdlib
 complex cstring
-complex ctime
 complex cwchar
 complex cwctype
 complex initializer_list
@@ -173,7 +170,6 @@ complex ios
 complex iosfwd
 complex istream
 complex limits
-complex ratio
 complex sstream
 complex stdexcept
 complex streambuf
@@ -213,7 +209,6 @@ ctgmath cstdint
 ctgmath cstdio
 ctgmath cstdlib
 ctgmath cstring
-ctgmath ctime
 ctgmath cwchar
 ctgmath cwctype
 ctgmath initializer_list
@@ -221,7 +216,6 @@ ctgmath ios
 ctgmath iosfwd
 ctgmath istream
 ctgmath limits
-ctgmath ratio
 ctgmath sstream
 ctgmath stdexcept
 ctgmath streambuf
@@ -263,7 +257,6 @@ experimental/iterator cstdint
 experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
-experimental/iterator ctime
 experimental/iterator cwchar
 experimental/iterator cwctype
 experimental/iterator initializer_list
@@ -271,7 +264,6 @@ experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
-experimental/iterator ratio
 experimental/iterator stdexcept
 experimental/iterator streambuf
 experimental/iterator string
@@ -392,7 +384,6 @@ fstream cstdint
 fstream cstdio
 fstream cstdlib
 fstream cstring
-fstream ctime
 fstream cwchar
 fstream cwctype
 fstream initializer_list
@@ -401,7 +392,6 @@ fstream ios
 fstream iosfwd
 fstream istream
 fstream limits
-fstream ratio
 fstream stdexcept
 fstream streambuf
 fstream string
@@ -463,14 +453,12 @@ iomanip cstdint
 iomanip cstdio
 iomanip cstdlib
 iomanip cstring
-iomanip ctime
 iomanip cwchar
 iomanip cwctype
 iomanip initializer_list
 iomanip ios
 iomanip iosfwd
 iomanip limits
-iomanip ratio
 iomanip stdexcept
 iomanip string
 iomanip string_view
@@ -487,13 +475,11 @@ ios cstdint
 ios cstdio
 ios cstdlib
 ios cstring
-ios ctime
 ios cwchar
 ios cwctype
 ios initializer_list
 ios iosfwd
 ios limits
-ios ratio
 ios stdexcept
 ios string
 ios string_view
@@ -513,7 +499,6 @@ iostream cstdint
 iostream cstdio
 iostream cstdlib
 iostream cstring
-iostream ctime
 iostream cwchar
 iostream cwctype
 iostream format
@@ -525,7 +510,6 @@ iostream limits
 iostream optional
 iostream ostream
 iostream print
-iostream ratio
 iostream stdexcept
 iostream streambuf
 iostream string
@@ -544,14 +528,12 @@ istream cstdint
 istream cstdio
 istream cstdlib
 istream cstring
-istream ctime
 istream cwchar
 istream cwctype
 istream initializer_list
 istream ios
 istream iosfwd
 istream limits
-istream ratio
 istream stdexcept
 istream streambuf
 istream string
@@ -600,14 +582,12 @@ locale cstdint
 locale cstdio
 locale cstdlib
 locale cstring
-locale ctime
 locale cwchar
 locale cwctype
 locale initializer_list
 locale ios
 locale iosfwd
 locale limits
-locale ratio
 locale stdexcept
 locale streambuf
 locale string
@@ -698,7 +678,6 @@ ostream cstdint
 ostream cstdio
 ostream cstdlib
 ostream cstring
-ostream ctime
 ostream cwchar
 ostream cwctype
 ostream format
@@ -708,7 +687,6 @@ ostream iosfwd
 ostream limits
 ostream optional
 ostream print
-ostream ratio
 ostream stdexcept
 ostream streambuf
 ostream string
@@ -871,7 +849,6 @@ sstream cstdint
 sstream cstdio
 sstream cstdlib
 sstream cstring
-sstream ctime
 sstream cwchar
 sstream cwctype
 sstream initializer_list
@@ -879,7 +856,6 @@ sstream ios
 sstream iosfwd
 sstream istream
 sstream limits
-sstream ratio
 sstream stdexcept
 sstream streambuf
 sstream string
@@ -917,14 +893,12 @@ streambuf cstdint
 streambuf cstdio
 streambuf cstdlib
 streambuf cstring
-streambuf ctime
 streambuf cwchar
 streambuf cwctype
 streambuf initializer_list
 streambuf ios
 streambuf iosfwd
 streambuf limits
-streambuf ratio
 streambuf stdexcept
 streambuf string
 streambuf string_view
@@ -969,7 +943,6 @@ strstream cstdint
 strstream cstdio
 strstream cstdlib
 strstream cstring
-strstream ctime
 strstream cwchar
 strstream cwctype
 strstream initializer_list
@@ -977,7 +950,6 @@ strstream ios
 strstream iosfwd
 strstream istream
 strstream limits
-strstream ratio
 strstream stdexcept
 strstream streambuf
 strstream string

@philnik777 philnik777 self-assigned this Jun 3, 2026
Copy link
Copy Markdown
Member

@ldionne ldionne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM: I don't see how this can be depended on by a conforming program. This reduces our ABI surface and simplifies the code.

Comment thread libcxx/src/ios.cpp
@philnik777 philnik777 force-pushed the remove_xindex_from_abi branch from 3134edf to c39c6db Compare June 4, 2026 22:34
@philnik777 philnik777 merged commit 762b77a into llvm:main Jun 4, 2026
12 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants