[c++] New module mangling ABI

Nathan Sidwell nathan@acm.org
Fri Mar 4 15:17:31 GMT 2022

This implements a new module mangling ABI as the original one has a
few issues:

a) it was not demangleable (oops)

b) implemented a weak ownership model.

This implements a strong ownership model, so that exported entities
from named modules are mangled to include their module attachment.
This gives more informative linker diagnostics and better module
isolation.  Weak ownership was hoped to allow backwards compatibility
with non-modular code, but in practice was very brittle, and C++20
added new semantics for linkage declarations that cover the needed

FAOD Clang is also moving to this ABI and documentation will be added
to the Itanium ABI specification.

Nathan Sidwell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-c-New-module-mangling-ABI.patch
Type: text/x-patch
Size: 32212 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20220304/c163c2cb/attachment-0001.bin>

More information about the Gcc-patches mailing list