[PATCH] D118249: [demangler] remove StdQualifiedName

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 6 18:29:10 PST 2022


ChuanqiXu added a comment.

In D118249#3283567 <https://reviews.llvm.org/D118249#3283567>, @urnathan wrote:

> In D118249#3281281 <https://reviews.llvm.org/D118249#3281281>, @ChuanqiXu wrote:
>
>> In D118249#3279254 <https://reviews.llvm.org/D118249#3279254>, @urnathan wrote:
>>
>>> 
>
>
>
>>>> Yeah, but it looks like StdQualifiedName is deleted completely...
>>>
>>> Yes.  That is the intent.
>>
>> I got your point. hmmm I think such rewriting would make the code harder to read. Is it possible to use StdQualifiedName to replace  NestedName (std, ...)?
>
> I'm sorry I disagree.  I see no reason to special-case '::std' in this way, and doing so makes the code harder to read --we'd keep having to check if a name is ::std.  Let's pick one way to represent nested names.
>
> ETA: Let's expand this a bit more.
> The substitution mechanism is a compression technique in the mangled symbols.  The Node type hierarchy is a representation of the components of an entity's identity, and the subsequent Node graph is that entity.  These latter two components need not and, I assert, should not contain representations of the compression -- that's mixing abstractions (The Nodes don't contain representations of the back-reference substitutions for instance.)
>
> I hope that makes things clearer?

So the key point here is: Although `::std` namespace is special in mangling, we could treat it homogeneously in the Node since we could handle it later. Do I understand right? If yes, I think this one should be good.


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

https://reviews.llvm.org/D118249



More information about the llvm-commits mailing list