[cxx-abi-dev] abi_tag mangling

John McCall rjmccall at apple.com
Thu Jun 2 23:22:15 UTC 2016


> On Jun 2, 2016, at 3:01 PM, Richard Smith <richardsmith at google.com> wrote:
> Thank you for writing this up!
> 
> If a type is not part of the regular mangling, and it contains an ABI tag in its mangling but not as part of its type (for instance, a dependent expression in a template argument references an entity with an ABI tag), does that appear in the resulting mangling?
> 
> (That is, is an implementation required to effectively mangle the return type and throw it away, or is some walk over the top-level type required instead?)
> 

Do templates have ABI tags, or are the tags only properties of template specializations?  How does that play into mangling and/or substitutability?

I assume ABI tags can apply to unions as well.  (The standard's definition of "compound type" distinguishes classes and unions.)

It's probably worth spelling out that tags do not apply to enumerators.

Are ABI tags mangled in the <prefix>, or just on the entity <name>?  What happens if the same tag is applied to multiple places in the lexical hierarchy, e.g. to both a class and one of its member functions?

I guess an inline friend function definition doesn't implicitly use the tags of its defining class, but presumably has them anyway because of their presence in the function signature.

Can you clarify which things in the Clang description are no longer correct?  I assume that a type used in the name of a conversion function should be mangled with its ABI tag.  Also, I don't see anything in your proposed wording that talks about not mangling ABI tags on an entity that appear in its type.

John.





> 
> On 2 Jun 2016 2:33 p.m., "Jason Merrill" <jason at redhat.com <mailto:jason at redhat.com>> wrote:
> I've finally written up a specification for abi_tag mangling for the ABI standard:
> 
> https://github.com/jicama/cxx-abi/commit/69cea3c9caf76cb308e35c66f4516f54973b6412 <https://github.com/jicama/cxx-abi/commit/69cea3c9caf76cb308e35c66f4516f54973b6412>
> 
> Note that some of the subtleties with local scopes described in the clang ABI tag documentation (http://clang.llvm.org/docs/ItaniumMangleAbiTags.html <http://clang.llvm.org/docs/ItaniumMangleAbiTags.html>) are due to bugs in GCC 5 that are fixed in GCC 6.
> 
> Jason
> _______________________________________________
> cxx-abi-dev mailing list
> cxx-abi-dev at codesourcery.com <mailto:cxx-abi-dev at codesourcery.com>
> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev <http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev>
> _______________________________________________
> cxx-abi-dev mailing list
> cxx-abi-dev at codesourcery.com
> http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20160602/b21c369a/attachment.html>


More information about the cxx-abi-dev mailing list