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
6 @interface Super : Root
12 @implementation Sub @end
14 @implementation Root @end
16 @interface Root(Cat) @end
18 @interface Sub(Cat) @end
20 @implementation Root(Cat) @end
22 @implementation Sub(Cat) @end
25 // CHECK: #pragma section(".objc_inithooks$B", long, read, write)
26 // CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CLASS_SETUP[] = {
27 // CHECK: (void *)&OBJC_CLASS_SETUP_$_Sub,
28 // CHECK: (void *)&OBJC_CLASS_SETUP_$_Root,
31 // CHECK: #pragma section(".objc_inithooks$B", long, read, write)
32 // CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CATEGORY_SETUP[] = {
33 // CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Root_$_Cat,
34 // CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Sub_$_Cat,