1 // RUN: %clang_cc1 -E %s -o %t.mm
2 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
7 @interface Super : Root
10 @interface Sub : Super
13 @implementation Sub @end
15 @implementation Root @end
17 @interface Root(Cat) @end
19 @interface Sub(Cat) @end
21 @implementation Root(Cat) @end
23 @implementation Sub(Cat) @end
26 // CHECK: #pragma section(".objc_inithooks$B", long, read, write)
27 // CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CLASS_SETUP[] = {
28 // CHECK: (void *)&OBJC_CLASS_SETUP_$_Sub,
29 // CHECK: (void *)&OBJC_CLASS_SETUP_$_Root,
32 // CHECK: #pragma section(".objc_inithooks$B", long, read, write)
33 // CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CATEGORY_SETUP[] = {
34 // CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Root_$_Cat,
35 // CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Sub_$_Cat,