]>
Commit | Line | Data |
---|---|---|
13ba007e A |
1 | #include "unload.h" |
2 | #include "testroot.i" | |
3 | #import <objc/objc-api.h> | |
4 | ||
5 | @implementation SmallClass : TestRoot | |
6 | -(void)unload2_instance_method { } | |
7 | @end | |
8 | ||
9 | ||
10 | @implementation BigClass : TestRoot | |
11 | @end | |
12 | ||
13 | OBJC_ROOT_CLASS | |
14 | @interface UnusedClass { id isa; } @end | |
15 | @implementation UnusedClass @end | |
16 | ||
17 | ||
18 | @protocol SmallProtocol | |
19 | -(void)unload2_category_method; | |
20 | @end | |
21 | ||
22 | @interface SmallClass (Category) <SmallProtocol> @end | |
23 | ||
24 | @implementation SmallClass (Category) | |
25 | -(void)unload2_category_method { } | |
26 | @end | |
1807f628 A |
27 | |
28 | // This isn't really weak-import: we link with `-undefined dynamic_lookup` | |
29 | // instead of providing a valid definition at link time. | |
30 | // But it looks the same to the runtime. | |
31 | __attribute__((weak_import)) | |
32 | @interface ClassThatIsWeakImportAndMissing : TestRoot @end | |
33 | ||
34 | @interface SubclassOfMissingWeakImport : ClassThatIsWeakImportAndMissing <SmallProtocol> @end | |
35 | @implementation SubclassOfMissingWeakImport | |
36 | -(void)unload2_category_method { } | |
37 | @end | |
38 | ||
39 | @interface ClassThatIsWeakImportAndMissing (Category) <SmallProtocol> @end | |
40 | @implementation ClassThatIsWeakImportAndMissing (Category) | |
41 | -(void)unload2_category_method { } | |
42 | @end |