annotate clang/test/CodeGenObjCXX/write-barrier-global-assign.mm @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -fobjc-gc -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -emit-llvm -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
2 // rdar://8761767
anatofuz
parents:
diff changeset
3
anatofuz
parents:
diff changeset
4 @class CPDestUser;
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 CPDestUser* FUNC();
anatofuz
parents:
diff changeset
7
anatofuz
parents:
diff changeset
8 // CHECK: {{call.* @objc_assign_global}}
anatofuz
parents:
diff changeset
9 CPDestUser* globalUser = FUNC();
anatofuz
parents:
diff changeset
10
anatofuz
parents:
diff changeset
11 // CHECK: {{call.* @objc_assign_weak}}
anatofuz
parents:
diff changeset
12 __weak CPDestUser* weakUser = FUNC();
anatofuz
parents:
diff changeset
13
anatofuz
parents:
diff changeset
14
anatofuz
parents:
diff changeset
15 // CHECK: {{call.* @objc_assign_global}}
anatofuz
parents:
diff changeset
16 static CPDestUser* staticUser = FUNC();
anatofuz
parents:
diff changeset
17
anatofuz
parents:
diff changeset
18 CPDestUser* GetDestUser()
anatofuz
parents:
diff changeset
19 {
anatofuz
parents:
diff changeset
20 // CHECK: {{call.* @objc_assign_global}}
anatofuz
parents:
diff changeset
21 static CPDestUser* gUser = FUNC();
anatofuz
parents:
diff changeset
22 // CHECK: {{call.* @objc_assign_weak}}
anatofuz
parents:
diff changeset
23 static __weak CPDestUser* wUser = FUNC();
anatofuz
parents:
diff changeset
24 if (wUser)
anatofuz
parents:
diff changeset
25 return wUser;
anatofuz
parents:
diff changeset
26 if (staticUser)
anatofuz
parents:
diff changeset
27 return staticUser;
anatofuz
parents:
diff changeset
28 return gUser;
anatofuz
parents:
diff changeset
29 }