]> git.saurik.com Git - apple/dyld.git/blob - testing/test-cases/_dyld_for_each_objc_class-missing-weak.dtest/lib2.m
dyld-732.8.tar.gz
[apple/dyld.git] / testing / test-cases / _dyld_for_each_objc_class-missing-weak.dtest / lib2.m
1
2 #import <Foundation/Foundation.h>
3
4 __attribute__((weak_import))
5 @interface MissingWeakSuperclass : NSObject
6 @end
7
8 // Note this class will be ignored at runtime as its superclass is weak
9 @interface DyldClass : MissingWeakSuperclass
10 @end
11
12 @implementation DyldClass
13 @end
14
15 // Note that this class does not have a weak superclass, but we can't optimize anything in this
16 // dylib as DyldClass does have a missing weak superclass. So we shouldn't find DyldLinkedClass in our
17 // closure class map
18 @interface DyldLinkedClass : NSObject
19 @end
20
21 @implementation DyldLinkedClass
22 @end
23
24 extern Class OBJC_CLASS_$_DyldLinkedClass;
25
26 Class getLinked2DyldLinkedClass() {
27 return (Class)&OBJC_CLASS_$_DyldLinkedClass;
28 }