2 #import <Foundation/Foundation.h>
4 __attribute__((weak_import))
5 @interface MissingWeakSuperclass : NSObject
8 // Note this class will be ignored at runtime as its superclass is weak
9 @interface DyldClass : MissingWeakSuperclass
12 @implementation DyldClass
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
18 @interface DyldLinkedClass : NSObject
21 @implementation DyldLinkedClass
24 extern Class OBJC_CLASS_$_DyldLinkedClass;
26 Class getLinked2DyldLinkedClass() {
27 return (Class)&OBJC_CLASS_$_DyldLinkedClass;