As discussed in D136775.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
libcxx/include/__format/parser_std_format_spec.h | ||
---|---|---|
126 | I think it would be good to document what should and what should not be hidden from the ABI. |
I think I like this approach, but we should discuss it in the context of D153658. Also, I think we want to punt this change to LLVM 18, I don't believe we're blocking ourselves from anything if we wait.
libcxx/include/__format/parser_std_format_spec.h | ||
---|---|---|
126 | I think that whatever we put an ABI tag on would also need to have hidden visibility. Otherwise, it is possible for users to start exporting symbols whose name depends on the libc++ version on their dylib boundaries, which is not good. |
libcxx/include/__config | ||
---|---|---|
630 | I think it would be useful to add this attribute to a few other internal-only types that are not meant to appear at ABI boundaries, just to make it clear how this attribute is intended to be used. A good candidate would be libcxx/include/__utility/exception_guard.h. | |
638 | This documentation needs to touch on the fact that we don't have a way to enforce that these types are not used at ABI boundaries, but that if it happens in e.g. a function signature the ABI break will be quite loud because the mangling of the type changes with the ODR signature (which includes e.g. the version of the library). We should also say that it's fine to use these types as return types and parameter types of functions, but only if said functions are marked as HIDE_FROM_ABI. We should also say that such types must never be used as a member of another type, except if that other type is *also* marked as HIDE_FROM_ABI_TYPE. | |
639 | I think I would do this now: #define _LIBCPP_HIDE_FROM_ABI_TYPE \ _LIBCPP_HIDDEN \ __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE)))) |
I think it would be useful to add this attribute to a few other internal-only types that are not meant to appear at ABI boundaries, just to make it clear how this attribute is intended to be used. A good candidate would be libcxx/include/__utility/exception_guard.h.