mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When a Clang-defined Objective-C class has the objc_runtime_visible
attribute, use objc_lookUpClass to get the Objective-C class object
rather than referencing the symbol directly. Also, ban subclassing of
Objective-C-runtime-visible classes as well as @objc on members of
extensions of such classes.
As a drive-by needed for this test, make
ClassDecl::getObjCRuntimeName() respect the Clang objc_runtime_name
attribute.
Fixes rdar://problem/25494454.
Fix an i32 vs. 64 issue in the IR matching for the IR generation test.
This reverts commit 09973e6956.
9 lines
160 B
Objective-C
9 lines
160 B
Objective-C
@interface Root
|
|
+(Class)class;
|
|
@end
|
|
|
|
__attribute__((objc_runtime_visible))
|
|
__attribute__((objc_runtime_name("MyRuntimeVisibleClass")))
|
|
@interface A : Root
|
|
@end
|