1 // RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
7 @interface Sub1 : NSObject @end
10 -(id)copy { return [super copy]; } // ok: instance method in class
11 +(id)copy { return [super copy]; } // ok: class method in class
14 @interface Sub2 : NSObject @end
16 @interface Sub2 (Category) @end
18 @implementation Sub2 (Category)
19 -(id)copy { return [super copy]; } // ok: instance method in category
20 +(id)copy { return [super copy]; } // BAD: class method in category
23 // CHECK: define internal ptr @"\01+[Sub2(Category) copy]
24 // CHECK: [[ONE:%.*]] = load ptr, ptr @"OBJC_CLASSLIST_SUP_REFS_$_.3"
25 // CHECK: [[THREE:%.*]] = getelementptr inbounds %struct._objc_super, ptr [[OBJC_SUPER:%.*]], i32 0, i32 1
26 // CHECK: store ptr [[ONE]], ptr [[THREE]]
27 // CHECK: [[FOUR:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES_