[libcxx-commits] [libcxx] [libc++] Remove _LIBCPP_COMPRESSED_PAIR/TRIPLE from shared_ptr (PR #200401)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 17 08:11:12 PDT 2026


================
@@ -215,6 +215,14 @@
 #endif
 #define _LIBCPP_HIDE_FROM_ABI_VIRTUAL _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
 
+// This macro makes sure that private classes which aren't necessarily part of the ABI change their name every release.
+// The intention is _not_ to put it on any class that is private, but only on classes where the class has to be kept ABI
+// stable if it has the same name. This is essentially the case for classes that are only accessed through the vtable
+// after instantiation, for example the control blocks of `shared_ptr`. Note that the vtable and RTTI are not marked
+// with [[gnu::visibility("hidden"), since the vtable and RTTI should still be deduplicated across dylibs with the same
+// instatiations.
----------------
ldionne wrote:

```suggestion
// This macro makes sure that private classes which aren't necessarily part of the ABI change their name every release.
// The intention is _not_ to put it on every private class, but only on classes where type name stability implies ABI stability. This is essentially the case for classes that are only accessed through the vtable
// after instantiation, for example the control blocks of `shared_ptr`. Indeed, these classes can change in ABI breaking ways, as long as their name (and hence their vtable symbol) changes too. Note that the vtable and RTTI are not marked
// with [[gnu::visibility("hidden"), since the vtable and RTTI should still be deduplicated across dylibs with the same
// instantiations.
```

https://github.com/llvm/llvm-project/pull/200401


More information about the libcxx-commits mailing list