This aligns with MSVC's output.
Fix #57999
Paths
| Differential D138326
[CodeView] Don't generate dummy unnamed strcut/class/union type. ClosedPublic Authored by zequanwu on Nov 18 2022, 1:12 PM.
Diff Detail
Unit TestsFailed Event TimelineComment Actions
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? Comment Actions Reverted previous change and change clang side so that it doesn't emit nested anonymous record type when emitting code-view. Comment Actions
Yes, that's something clang does only for codeview, changed in clang side. It will still emit type info for unnamed records but not for anonymous records.
This revision is now accepted and ready to land.Dec 5 2022, 2:51 PM Comment Actions Landed at: https://reviews.llvm.org/rGbb5bcddcdbc151119f449be2d1e0d90f2e9c4258. Forgot to add the "Revision" line.
Revision Contents
Diff 476582 llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/test/DebugInfo/COFF/nested-types.ll
|
So the test shows that we don't have NestedType records for unnamed unions & structs, right?