• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3// rdar:// 11124354
4
5@interface Root @end
6
7@interface Super : Root
8@end
9
10@interface Sub : Super
11@end
12
13@implementation Sub @end
14
15@implementation Root @end
16
17@interface Root(Cat) @end
18
19@interface Sub(Cat) @end
20
21@implementation Root(Cat) @end
22
23@implementation Sub(Cat) @end
24
25
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,
30// CHECK: };
31
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,
36// CHECK: };
37