[PATCH] D114307: [Demangle] Add support for D anonymous symbols

Luís Ferreira via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 25 13:41:58 PST 2021


ljmf00 added a comment.

In D114307#3144845 <https://reviews.llvm.org/D114307#3144845>, @dblaikie wrote:

> Looks OK, though the "anonymous" in the mangled name tests seems misleading - the "anonymous" isn't itself, anonymous, right? IT's followed by anonymous symbol (`0`), yeah? So maybe change that text/name - might be clearer.

Yeah, I understand that this could be misleading. I changed `anonymous` to `test`.

> Alternatively, wouldn't this fall out naturally from `parseIdentifier` if `parseIdentifier` returned `Mangled` (rather than `nullptr`) when `Len == 0`? Seems that'd be simpler/tidier?

No, it would not fall naturally since backreferencing symbols may happen (in the future, not yet implemented). As is, it would fall naturally since e.g. `00035` would be decoded as `35`, but in the case where `0Q...`, a dot would be appended anyway and logic would be needed later to avoid it. The reason for doing this early is also for performance reasons since other checks are not needed such as whether it is a template or a backreference. Other expensive checks should be avoided like when a number decoding overflows.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114307/new/

https://reviews.llvm.org/D114307



More information about the llvm-commits mailing list