This aligns with MSVC's output.
Fix #57999
Differential D138326
[CodeView] Don't generate dummy unnamed strcut/class/union type. zequanwu on Nov 18 2022, 1:12 PM. Authored by
Diff Detail
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.
Comment Actions Landed at: https://reviews.llvm.org/rGbb5bcddcdbc151119f449be2d1e0d90f2e9c4258. Forgot to add the "Revision" line. |