mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[DebugInfo] Fix debug info round tripping of types inside functions
Types with @_originallyDefinedIn cannot be round tripped, Types declared inside functions have their mangling affected by the function signature. If the generic signature mentions an @_originallyDefinedIn type, the type inside the function cannot be round tripped either. This commit disables round tripping for this scenario.
This commit is contained in:
@@ -21,6 +21,19 @@ public func localTypeAliasTest(horse: Horse) {
|
||||
// CHECK: DIDerivedType(tag: DW_TAG_typedef, name: "$s32local_type_originally_defined_in0A13TypeAliasTest5horsey4Barn5HorseV_tF1AL_aD"
|
||||
}
|
||||
|
||||
|
||||
public func localTypeTest(horse: Horse) {
|
||||
// The local type mangling for 'A' mentions 'Horse', which must
|
||||
// be mangled using it's current module name, and not the
|
||||
// original module name, for consistency with the debug info
|
||||
// mangling.
|
||||
struct LocalStruct {}
|
||||
|
||||
let info = UnsafeMutablePointer<LocalStruct>.allocate(capacity: 1)
|
||||
_ = info
|
||||
// CHECK: DICompositeType(tag: DW_TAG_structure_type, name: "$s32local_type_originally_defined_in0A8TypeTest5horsey4Barn5HorseV_tF11LocalStructL_VD"
|
||||
}
|
||||
|
||||
public func localTypeAliasTest() -> Horse {
|
||||
typealias B = Int
|
||||
|
||||
|
||||
Reference in New Issue
Block a user