[PATCH] D97411: [DebugInfo] Add an attribute to force type info to be emitted for types that are required to be complete.

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 2 15:11:34 PST 2021


dblaikie added a comment.

In D97411#2598625 <https://reviews.llvm.org/D97411#2598625>, @akhuang wrote:

> In D97411#2595155 <https://reviews.llvm.org/D97411#2595155>, @dblaikie wrote:
>
>> In D97411#2595049 <https://reviews.llvm.org/D97411#2595049>, @akhuang wrote:
>>
>>> In D97411#2594345 <https://reviews.llvm.org/D97411#2594345>, @ldionne wrote:
>>>
>>>> I don't have an opinion about the attribute itself. I do have an opinion about using that attribute in libc++ instead of fixing the underlying issue (I think we shouldn't do it). Can you confirm what the problematic types are? In another patch I saw `__hash_node`, `__hash_value_type`, `__tree_node` and `__value_type`. Is that it?
>>>
>>> Not entirely sure - those were pointed out as types with missing debug info, but there might be more. I tried looking for types in libc++ that have a `value_type` member, since those seem to follow a similar pattern. Possibly `__forward_list_node`?
>>
>> Since we'll need to identify this list of types either way (to attribute or to fix) might be worth making the list - I'd guess building all the libc++ tests with/without ctor homing and seeing which types go missing as a result might be informative?
>
> I started looking into some diffs of debug info in libc++ tests, but it's pretty hard to tell what's different - as far as I can see, there are just a bunch of `__hash_value_type`s and `__value_type`s.

Happy to help if there's anything I can do there (did a lot of comparisons like this when adding other type homing strategies and diffing GCC and Clang output in the past) dumping the fully qualified names (or mangled names) of all the types (llvm-dwarfdump has a mode where it specifically dumps the names of types in type units that I've used for this purpose in the past, for instance) then diffing, stripping off uninteresting template parameters to deduplicate, etc, possibly.

> If I look in Visual Studio's debug info (on a file where I just construct all the libc++ types) I get errors for `__list_node`, `__tree_node`, and `__hash_node`. That's probably about it, and if there end up being more, it should be pretty straightforward to fix those later?

Yeah - though having at least a rough list to get a sense of the scale of the work's probably helpful. Maybe that list is these 3-4 names. (are they each singular types - or are there several distinct uses of "__tree_node" as a name in different contexts that would need to be fixed separately, for instance?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97411



More information about the cfe-commits mailing list