Michael137 added a comment.

In D145803#4220124 <https://reviews.llvm.org/D145803#4220124>, @wolfgangp wrote:

> In D145803#4219894 <https://reviews.llvm.org/D145803#4219894>, @probinson 
> wrote:
>
>> This is pretty different from the "always desugar to the canonical type" 
>> habit that has always been in place. Sony has done some downstream things to 
>> try to work around that in the past. @wolfgangp will remember it better than 
>> I do, but I think we make some effort to preserve the type-as-written. This 
>> goes in completely the other direction.
>
> The Sony solution does not rely on a user-specified attribute, but uniformly 
> preserves all typedefs, though only in template argument types. Similar to 
> this solution, it adds a second type to keep track of the preferred type, 
> though it does so in the TemplateArgument structure as a separate QualType. A 
> client can then either print the preferred type or the canonical type, 
> depending on a printing policy, which is controlled by an option. This leads 
> to a similar result in the resulting DWARF, i.e. the DW_AT_type node gets the 
> preferred type string. The preferred type can also be used for diagnostic 
> messages.

Neat, thanks for outlining your approach. IIUC, this basically just replicates 
the `PrintingPolicy::UsePreferredNames` when printing the names of template 
specializations. But it works for all typedefs, not just those annotated with 
the attribute.

@probinson Sounds like Sony's solution also changes the `DW_AT_type` to a 
non-canonical form. Do you still have concerns with the direction of this 
patch? Would it cause any problems for you downstream?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145803

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to