1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -E %s -o %t.mm 2*f4a2713aSLionel Sambuc// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s 3*f4a2713aSLionel Sambuc// rdar:// 11124354 4*f4a2713aSLionel Sambuc 5*f4a2713aSLionel Sambuc@interface Root @end 6*f4a2713aSLionel Sambuc 7*f4a2713aSLionel Sambuc@interface Super : Root 8*f4a2713aSLionel Sambuc@end 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc@interface Sub : Super 11*f4a2713aSLionel Sambuc@end 12*f4a2713aSLionel Sambuc 13*f4a2713aSLionel Sambuc@implementation Sub @end 14*f4a2713aSLionel Sambuc 15*f4a2713aSLionel Sambuc@implementation Root @end 16*f4a2713aSLionel Sambuc 17*f4a2713aSLionel Sambuc@interface Root(Cat) @end 18*f4a2713aSLionel Sambuc 19*f4a2713aSLionel Sambuc@interface Sub(Cat) @end 20*f4a2713aSLionel Sambuc 21*f4a2713aSLionel Sambuc@implementation Root(Cat) @end 22*f4a2713aSLionel Sambuc 23*f4a2713aSLionel Sambuc@implementation Sub(Cat) @end 24*f4a2713aSLionel Sambuc 25*f4a2713aSLionel Sambuc 26*f4a2713aSLionel Sambuc// CHECK: #pragma section(".objc_inithooks$B", long, read, write) 27*f4a2713aSLionel Sambuc// CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CLASS_SETUP[] = { 28*f4a2713aSLionel Sambuc// CHECK: (void *)&OBJC_CLASS_SETUP_$_Sub, 29*f4a2713aSLionel Sambuc// CHECK: (void *)&OBJC_CLASS_SETUP_$_Root, 30*f4a2713aSLionel Sambuc// CHECK: }; 31*f4a2713aSLionel Sambuc 32*f4a2713aSLionel Sambuc// CHECK: #pragma section(".objc_inithooks$B", long, read, write) 33*f4a2713aSLionel Sambuc// CHECK: __declspec(allocate(".objc_inithooks$B")) static void *OBJC_CATEGORY_SETUP[] = { 34*f4a2713aSLionel Sambuc// CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Root_$_Cat, 35*f4a2713aSLionel Sambuc// CHECK: (void *)&OBJC_CATEGORY_SETUP_$_Sub_$_Cat, 36*f4a2713aSLionel Sambuc// CHECK: }; 37