Skip to content

[libc++] Always keep libc++abi re-exports up-to-date #79012

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 5 commits into from
Feb 26, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Jan 22, 2024

Previously, the list of libc++abi symbols that we re-export from libc++ would be partly encoded in libc++abi (and re-exported automatically via the cxxabi-reexports target), and partly hard-coded in libcxx/lib/libc++abi.exp. The duplication of information led to symbols not being exported from libc++ after being added to libc++abi when they should have been.

This patch removes the duplication of information. After this patch, the full list of symbols to re-export from libc++abi is handled by the cxxabi-reexports target and is stored in libcxxabi.

The symbols newly re-exported from libc++ are mainly new fundamental typeinfos and a bunch of functions and classes that are part of libc++abi but are most likely implementation details. In the future, it would be possible to try to trim down the set of what we export from libc++abi (and hence what we re-export from libc++) to remove some implementation detail symbols.

Fixes #79008

@ldionne ldionne requested review from a team as code owners January 22, 2024 17:11
@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. libc++abi libc++abi C++ Runtime Library. Not libc++. labels Jan 22, 2024
@llvmbot
Copy link
Member

llvmbot commented Jan 22, 2024

@llvm/pr-subscribers-libcxx

@llvm/pr-subscribers-libcxxabi

Author: Louis Dionne (ldionne)

Changes

Previously, the list of libc++abi symbols that we re-export from libc++ would be partly encoded in libc++abi (and re-exported automatically via the cxxabi-reexports target), and partly hard-coded in libcxx/lib/libc++abi.exp. The duplication of information led to symbols not being exported from libc++ after being added to libc++abi when they should have been.

This patch removes the duplication of information. After this patch, the full list of symbols to re-export from libc++abi is handled by the cxxabi-reexports target and is stored in libcxxabi.

The symbols newly re-exported from libc++ are mainly new fundamental typeinfos and a bunch of functions and classes that are part of libc++abi but are most likely implementation details. In the future, it would be possible to try to trim down the set of what we export from libc++abi (and hence what we re-export from libc++) to remove some implementation detail symbols.

Fixes #79008


Patch is 47.75 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/79012.diff

11 Files Affected:

  • (modified) libcxx/lib/abi/CHANGELOG.TXT (+65)
  • (modified) libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist (+98)
  • (modified) libcxx/src/CMakeLists.txt (+2-7)
  • (added) libcxxabi/lib/cxxabiv1.exp (+38)
  • (added) libcxxabi/lib/fundamental-types.exp (+153)
  • (modified) libcxxabi/lib/itanium-base.exp (-325)
  • (renamed) libcxxabi/lib/itanium-exceptions.exp (+1)
  • (modified) libcxxabi/lib/new-delete.exp (+1)
  • (renamed) libcxxabi/lib/std-exceptions.exp (+88-262)
  • (added) libcxxabi/lib/std-misc.exp (+9)
  • (modified) libcxxabi/src/CMakeLists.txt (+19-19)
diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT
index df4e5aa3859543..ab2127b1e10f5d 100644
--- a/libcxx/lib/abi/CHANGELOG.TXT
+++ b/libcxx/lib/abi/CHANGELOG.TXT
@@ -12,6 +12,71 @@ To generate a summary, re-generate the new ABI list using the
 
 New entries should be added directly below the "Version" header.
 
+------------
+Version 19.0
+------------
+
+* [libc++] Always keep libc++abi re-exports up-to-date
+
+  This patch makes sure that the set of libc++abi symbols re-exported from libc++
+  is up-to-date with the symbols that libc++abi re-exports. As such, it adds several
+  symbols that were left out of the libc++ re-exports list. Exporting new symbols
+  is not an ABI break.
+
+  <arch>-apple-darwin
+  -------------------
+  Symbol reexported: ___cxa_current_primary_exception
+  Symbol reexported: ___cxa_decrement_exception_refcount
+  Symbol reexported: ___cxa_increment_exception_refcount
+  Symbol reexported: ___cxa_new_handler
+  Symbol reexported: ___cxa_rethrow_primary_exception
+  Symbol reexported: ___cxa_terminate_handler
+  Symbol reexported: ___cxa_uncaught_exception
+  Symbol reexported: ___cxa_unexpected_handler
+  Symbol reexported: __ZTIDh
+  Symbol reexported: __ZTIDu
+  Symbol reexported: __ZTIg
+  Symbol reexported: __ZTIn
+  Symbol reexported: __ZTIN10__cxxabiv116__enum_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv116__shim_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv117__array_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv117__class_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv117__pbase_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv119__pointer_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv120__function_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv120__si_class_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv121__vmi_class_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv123__fundamental_type_infoE
+  Symbol reexported: __ZTIN10__cxxabiv129__pointer_to_member_type_infoE
+  Symbol reexported: __ZTIo
+  Symbol reexported: __ZTIPDh
+  Symbol reexported: __ZTIPDu
+  Symbol reexported: __ZTIPg
+  Symbol reexported: __ZTIPKDh
+  Symbol reexported: __ZTIPKDu
+  Symbol reexported: __ZTIPKg
+  Symbol reexported: __ZTIPKn
+  Symbol reexported: __ZTIPKo
+  Symbol reexported: __ZTIPn
+  Symbol reexported: __ZTIPo
+  Symbol reexported: __ZTSDh
+  Symbol reexported: __ZTSDu
+  Symbol reexported: __ZTSg
+  Symbol reexported: __ZTSn
+  Symbol reexported: __ZTSN10__cxxabiv116__shim_type_infoE
+  Symbol reexported: __ZTSo
+  Symbol reexported: __ZTSPDh
+  Symbol reexported: __ZTSPDu
+  Symbol reexported: __ZTSPg
+  Symbol reexported: __ZTSPKDh
+  Symbol reexported: __ZTSPKDu
+  Symbol reexported: __ZTSPKg
+  Symbol reexported: __ZTSPKn
+  Symbol reexported: __ZTSPKo
+  Symbol reexported: __ZTSPn
+  Symbol reexported: __ZTSPo
+  Symbol reexported: __ZTVN10__cxxabiv116__shim_type_infoE
+
 ------------
 Version 18.0
 ------------
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 b51af1bb0f9ef2..0553b2ab39e941 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
@@ -70,26 +70,46 @@
 {'is_defined': False, 'name': '__ZSt15get_new_handlerv', 'type': 'U'}
 {'is_defined': False, 'name': '__ZSt15set_new_handlerPFvvE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZSt9terminatev', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIDu', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv116__enum_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv116__shim_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv117__array_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv117__class_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv117__pbase_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv119__pointer_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv120__function_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv120__si_class_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPDu', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPKDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPKDu', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKa', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKb', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKc', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKd', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPKg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPKn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPKo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPKv', 'type': 'U'}
@@ -102,11 +122,14 @@
 {'is_defined': False, 'name': '__ZTIPd', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIPo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIPv', 'type': 'U'}
@@ -135,21 +158,27 @@
 {'is_defined': False, 'name': '__ZTId', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTIo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIv', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIw', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIx', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTIy', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSDu', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSN10__cxxabiv116__shim_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'U'}
@@ -159,23 +188,30 @@
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv121__vmi_class_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv123__fundamental_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPDu', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPKDh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKDi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKDn', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKDs', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPKDu', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKa', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKb', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKc', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKd', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPKg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPKn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPKo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPKv', 'type': 'U'}
@@ -188,11 +224,14 @@
 {'is_defined': False, 'name': '__ZTSPd', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSPo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSPv', 'type': 'U'}
@@ -221,11 +260,14 @@
 {'is_defined': False, 'name': '__ZTSd', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSe', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSf', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSg', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSh', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSi', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSj', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSl', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSm', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSn', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTSo', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSs', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSt', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSv', 'type': 'U'}
@@ -233,6 +275,7 @@
 {'is_defined': False, 'name': '__ZTSx', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTSy', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTVN10__cxxabiv116__enum_type_infoE', 'type': 'U'}
+{'is_defined': False, 'name': '__ZTVN10__cxxabiv116__shim_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTVN10__cxxabiv117__array_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTVN10__cxxabiv117__class_type_infoE', 'type': 'U'}
 {'is_defined': False, 'name': '__ZTVN10__cxxabiv117__pbase_type_infoE', 'type': 'U'}
@@ -300,12 +343,16 @@
 {'is_defined': False, 'name': '___cxa_guard_acquire', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_guard_release', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_increment_exception_refcount', 'type': 'U'}
+{'is_defined': False, 'name': '___cxa_new_handler', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_pure_virtual', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_rethrow', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_rethrow_primary_exception', 'type': 'U'}
+{'is_defined': False, 'name': '___cxa_terminate_handler', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_throw', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_throw_bad_array_new_length', 'type': 'U'}
+{'is_defined': False, 'name': '___cxa_uncaught_exception', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_uncaught_exceptions', 'type': 'U'}
+{'is_defined': False, 'name': '___cxa_unexpected_handler', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_vec_cctor', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_vec_cleanup', 'type': 'U'}
 {'is_defined': False, 'name': '___cxa_vec_ctor', 'type': 'U'}
@@ -1942,9 +1989,22 @@
 {'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_13basic_istreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTCNSt3__19strstreamE0_NS_14basic_iostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTCNSt3__19strstreamE16_NS_13basic_ostreamIcNS_11char_traitsIcEEEE', 'size': 0, 'type': 'OBJECT'}
+{'is_defined': True, 'name': '__ZTIDh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIDi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIDn', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIDs', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIDu', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv116__enum_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv116__shim_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv117__array_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv117__class_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv117__pbase_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv119__pointer_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv120__function_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv120__si_class_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv121__vmi_class_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv123__fundamental_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIN10__cxxabiv129__pointer_to_member_type_infoE', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTINSt12experimental15fundamentals_v112bad_any_castE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTINSt12experimental19bad_optional_accessE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTINSt3__110istrstreamE', 'size': 0, 'type': 'OBJECT'}
@@ -2052,23 +2112,30 @@
 {'is_defined': True, 'name': '__ZTINSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTINSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTINSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'}
+{'is_defined': True, 'name': '__ZTIPDh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPDi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPDn', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPDs', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPDu', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPKDh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKDi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKDn', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKDs', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPKDu', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKa', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKb', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKc', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKd', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKe', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKf', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPKg', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKj', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKl', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKm', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPKn', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPKo', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKs', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKt', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPKv', 'type': 'I'}
@@ -2081,11 +2148,14 @@
 {'is_defined': True, 'name': '__ZTIPd', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPe', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPf', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPg', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPj', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPl', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPm', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPn', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIPo', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPs', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPt', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIPv', 'type': 'I'}
@@ -2118,21 +2188,27 @@
 {'is_defined': True, 'name': '__ZTId', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIe', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIf', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIg', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIj', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIl', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIm', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIn', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTIo', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIs', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIt', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIv', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIw', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIx', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTIy', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTSDh', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSDi', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSDn', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSDs', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTSDu', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSN10__cxxabiv116__enum_type_infoE', 'type': 'I'}
+{'is_defined': True, 'name': '__ZTSN10__cxxabiv116__shim_type_infoE', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSN10__cxxabiv117__array_type_infoE', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSN10__cxxabiv117__class_type_infoE', 'type': 'I'}
 {'is_defined': True, 'name': '__ZTSN10__cxxabiv117__pbase_type_infoE', 'type': 'I'}
@@ -2224,23 +2300,30 @@
 {'is_defined': True, 'name': '__ZTSNSt3__19money_putIcNS_19ostreambuf_iteratorIcNS_11char_traitsIcEEEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTSNSt3__19money_putIwNS_19ostreambuf_iteratorIwNS_11char_traitsIwEEEEEE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZTSNSt3__19strstreamE', 'size': 0, 'type': 'OBJECT'}
+{'is_defi...
[truncated]

@ldionne ldionne force-pushed the review/fix-reexports branch 2 times, most recently from 6a1b5b3 to b5cacaa Compare January 22, 2024 17:19
@ldionne ldionne force-pushed the review/fix-reexports branch from 1167ae8 to 70deaec Compare January 29, 2024 19:29
Previously, the list of libc++abi symbols that we re-export from libc++
would be partly encoded in libc++abi (and re-exported automatically via
the cxxabi-reexports target), and partly hard-coded in libcxx/lib/libc++abi.exp.
The duplication of information led to symbols not being exported from
libc++ after being added to libc++abi when they should have been.

This patch removes the duplication of information. After this patch,
the full list of symbols to re-export from libc++abi is handled by the
cxxabi-reexports target and is stored in libcxxabi.

The symbols newly re-exported from libc++ are mainly new fundamental
typeinfos and a bunch of functions and classes that are part of
libc++abi but are most likely implementation details. In the future,
it would be possible to try to trim down the set of what we export from
libc++abi (and hence what we re-export from libc++) to remove some
implementation detail symbols.

Fixes llvm#79008
@ldionne ldionne force-pushed the review/fix-reexports branch from 70deaec to 4cbad83 Compare February 5, 2024 16:59
@ldionne ldionne merged commit 6a884a9 into llvm:main Feb 26, 2024
@ldionne ldionne deleted the review/fix-reexports branch February 26, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++abi libc++abi C++ Runtime Library. Not libc++. libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[libc++] Re-exports from libc++abi are out of sync
3 participants