mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -5,6 +5,10 @@
|
||||
- (void) anse;
|
||||
@end
|
||||
|
||||
__attribute__((swift_name("BetterAnsing")))
|
||||
@protocol NSBetterAnsing <NSAnsing>
|
||||
@end
|
||||
|
||||
@interface NSObject (NSAnsing)
|
||||
@property Class<NSAnsing> qualifiedClassProp;
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user