[PATCH] D138326: [CodeView] Don't generate dummy unnamed strcut/class/union type.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 15:23:20 PST 2022


dblaikie added a comment.

In D138326#3938128 <https://reviews.llvm.org/D138326#3938128>, @rnk wrote:

> Since Clang creates the member list and only adds types for the benefit of codeview, should we change clang instead?
>
> + at dblaikie

Looks like DWARF wants the types (in DWARF we describe the union and use the DWARF attribute `DW_AT_export_symbols` (encoded in the `DICompositeType`'s `DIFlagExportSymbols` flag) to say that the names in the union are visible within the enclosing scope, but doesn't put an artificial name on those types. So probably the naming logic here https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/clang/lib/CodeGen/CGDebugInfo.cpp#L336-L340 might be able to be removed - but I guess you probably still need it for non-nested unnamed types?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138326



More information about the llvm-commits mailing list