swift
7a191e54 - [IRGenDebugInfo][CodeView] Name inner type member in bound generic sized containers

Commit
194 days ago
[IRGenDebugInfo][CodeView] Name inner type member in bound generic sized containers As a workaround for issues with uniquing, bound generics are emitted as a nested structure: - A sized outer structure with no name or identifier - A sizeless inner structure with the mangled name as the name and no identifier. The actual mechanism of connection for the inner and outer structures is that the outer structure has a single unnamed member whose type is the inner structure. However, LLVM CodeView emission treats unnamed members as anonymous structs and tries to inline their members into the parent. But since the inner struct has no members, the effect is that it gets dropped. This change names the inner struct with the mangled type name. This will have the effect of preserving the inner struct in CodeView output, and allow us to use a variation of the DWARF logic at https://github.com/swiftlang/llvm-project/blob/cd1235e59b87c84144802ab85592ee75a615f231/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserSwift.cpp#L166 to recognize and handle this pattern. More details and discussion at https://github.com/swiftlang/swift/issues/87093
Parents
Loading