The existing module symbol mangling scheme turns out to be undemangleable. It is also desirable to switch to the strong-ownership model as the hoped-for C++17 compatibility turns out to be fragile, and we also now have a better way of controlling that.
The issue is captured on the ABI list at:
https://github.com/itanium-cxx-abi/cxx-abi/issues/134
A document describing the issues and new mangling is at: (sigh, I wish I cold get a stable name here)
https://drive.google.com/file/d/1XAR2RLzrpAoWGBQcPkxP33s8SwB2y4vb/view?usp=sharing
This patch reimplements the bits of mangling that we already had, it does not implement the other bits mentioned in that document such as global initializer functions or unnamed enumerations (which itself needs adjusting from the doc).
GCC implements this mangling.
The old mangling is unceremoniously dropped. No backwards compatibility, no deprectated old-mangling flag. It was always labelled experimental. (Old and new manglings cannot be confused.)
I see one instance of us passing around a DeclContext as a nullptr, what is the justification/mechanism for that? I would expect EVERYTHING to have a declaration context, so I would expect this to be able to be a reference.