annotate clang/test/CodeGenObjC/objc2-weak-import-attribute.m @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-X86-64 %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 __attribute__((weak_import)) @interface WeakRootClass @end
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 __attribute__((weak_import)) @interface WeakClass : WeakRootClass
anatofuz
parents:
diff changeset
6 @end
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 @interface MySubclass : WeakClass @end
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 @implementation MySubclass @end
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 @implementation WeakClass(MyCategory) @end
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 __attribute__((weak_import))
anatofuz
parents:
diff changeset
16 @interface WeakClass1 @end
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 @implementation WeakClass1(MyCategory) @end
anatofuz
parents:
diff changeset
19
anatofuz
parents:
diff changeset
20 @implementation WeakClass1(YourCategory) @end
anatofuz
parents:
diff changeset
21
anatofuz
parents:
diff changeset
22 __attribute__((weak_import))
anatofuz
parents:
diff changeset
23 @interface WeakClass3
anatofuz
parents:
diff changeset
24 + message;
anatofuz
parents:
diff changeset
25 @end
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 int main() {
anatofuz
parents:
diff changeset
28 [WeakClass3 message];
anatofuz
parents:
diff changeset
29 }
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 // CHECK-X86-64: OBJC_METACLASS_$_WeakRootClass" = extern_weak global
anatofuz
parents:
diff changeset
32 // CHECK-X86-64: OBJC_METACLASS_$_WeakClass" = extern_weak global
anatofuz
parents:
diff changeset
33 // CHECK-X86-64: OBJC_CLASS_$_WeakClass" = extern_weak global
anatofuz
parents:
diff changeset
34 // CHECK-X86-64: OBJC_CLASS_$_WeakClass1" = extern_weak global
anatofuz
parents:
diff changeset
35 // CHECK-X86-64: OBJC_CLASS_$_WeakClass3" = extern_weak global
anatofuz
parents:
diff changeset
36
anatofuz
parents:
diff changeset
37 // Root is being implemented here. No extern_weak.
anatofuz
parents:
diff changeset
38 __attribute__((weak_import)) @interface Root @end
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 @interface Super : Root @end
anatofuz
parents:
diff changeset
41
anatofuz
parents:
diff changeset
42 @interface Sub : Super @end
anatofuz
parents:
diff changeset
43
anatofuz
parents:
diff changeset
44 @implementation Sub @end
anatofuz
parents:
diff changeset
45
anatofuz
parents:
diff changeset
46 @implementation Root @end
anatofuz
parents:
diff changeset
47
anatofuz
parents:
diff changeset
48 // CHECK-X86-64-NOT: OBJC_METACLASS_$_Root" = extern_weak global