mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Mangle imported declarations using their C names.
This makes them consistent no matter what shenanigans are pulled by the importer, particularly NS_ENUM vs. NS_OPTIONS and NS_SWIFT_NAME. The 'NSErrorDomain' API note /nearly/ works with this, but the synthesized error struct is still mangled as a Swift declaration, which means it's not rename-stable. See follow-up commits. The main place where this still falls down is NS_STRING_ENUM: when this is applied, a typedef is imported as a unique struct, but without it it's just a typealias for the underlying type. There's also still a problem with synthesized conformances, which have a module mangled into the witness table symbol even though that symbol is linkonce_odr. rdar://problem/31616162
This commit is contained in:
@@ -63,7 +63,7 @@ print("ObjC quick look objects:")
|
||||
// CHECK-LABEL: ObjC enums:
|
||||
print("ObjC enums:")
|
||||
|
||||
// CHECK-NEXT: We cannot reflect ComparisonResult yet
|
||||
// CHECK-NEXT: We cannot reflect NSComparisonResult yet
|
||||
print("We cannot reflect \(ComparisonResult.orderedAscending) yet")
|
||||
|
||||
// Don't crash when introspecting framework types such as NSURL.
|
||||
|
||||
Reference in New Issue
Block a user