This is an archive of the discontinued LLVM Phabricator instance.

[libcxxabi][demangler] Special case demangling for pass_object_size attribute
Needs ReviewPublic

Authored by erik.pilkington on Dec 14 2017, 3:13 PM.

Details

Summary

This patch adds demangling for pass_object_size attribute (https://clang.llvm.org/docs/AttributeReference.html#pass-object-size). This attribute applies to function parameters. This attribute is mangled as if it was meant to match the <extended-qualifier> production (https://itanium-cxx-abi.github.io/cxx-abi/abi.html#mangle.qualified-type), but clang emits it after the type it refers to instead of before. I think this was a mistake, but its probably too late to fix it because of the ABI break.

Thanks for taking a look!
Erik

Diff Detail

Event Timeline

Thanks for working on this!

Unfortunately, I've never touched demanglers before, so I don't think I can LGTM this patch.

This attribute is mangled as if it was meant to match the <extended-qualifier> production.

Yup, definitely a mistake. Apologies. :)

test/test_demangle.pass.cpp
29618

Nit: Can we have a test with pass_object_size(1) (or 2, or 3. Any of the 3 WFM), as well?

Add a testcase with pass_object_size[0-3].