annotate clang/test/CodeGenObjC/nontrivial-c-struct-within-struct-name.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 arm64-apple-ios11 -fobjc-arc -emit-llvm -o - %s | FileCheck %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 @class I;
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 typedef struct {
anatofuz
parents:
diff changeset
6 I *name;
anatofuz
parents:
diff changeset
7 } Foo;
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 typedef struct {
anatofuz
parents:
diff changeset
10 Foo foo;
anatofuz
parents:
diff changeset
11 } Bar;
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 typedef struct {
anatofuz
parents:
diff changeset
14 Bar bar;
anatofuz
parents:
diff changeset
15 } Baz;
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 I *getI();
anatofuz
parents:
diff changeset
18
anatofuz
parents:
diff changeset
19 void f() {
anatofuz
parents:
diff changeset
20 Foo foo = {getI()};
anatofuz
parents:
diff changeset
21 Bar bar = {foo};
anatofuz
parents:
diff changeset
22 Baz baz = {bar};
anatofuz
parents:
diff changeset
23 }
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 // CHECK: define linkonce_odr hidden void @__destructor_8_S_S_s0(i8** %[[DST:.*]])
anatofuz
parents:
diff changeset
26 // CHECK: %[[DST_ADDR:.*]] = alloca i8**, align 8
anatofuz
parents:
diff changeset
27 // CHECK: store i8** %[[DST]], i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
28 // CHECK: %[[V0:.*]] = load i8**, i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
29 // CHECK: call void @__destructor_8_S_s0(i8** %[[V0]])
anatofuz
parents:
diff changeset
30 // CHECK: ret void
anatofuz
parents:
diff changeset
31
anatofuz
parents:
diff changeset
32 // CHECK: define linkonce_odr hidden void @__destructor_8_S_s0(i8** %[[DST:.*]])
anatofuz
parents:
diff changeset
33 // CHECK: %[[DST_ADDR:.*]] = alloca i8**, align 8
anatofuz
parents:
diff changeset
34 // CHECK: store i8** %[[DST]], i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
35 // CHECK: %[[V0:.*]] = load i8**, i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
36 // CHECK: call void @__destructor_8_s0(i8** %[[V0]])
anatofuz
parents:
diff changeset
37 // CHECK: ret void
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 // CHECK: define linkonce_odr hidden void @__destructor_8_s0(i8** %dst)
anatofuz
parents:
diff changeset
40 // CHECK: %[[DST_ADDR:.*]] = alloca i8**, align 8
anatofuz
parents:
diff changeset
41 // CHECK: store i8** %[[DST]], i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
42 // CHECK: %[[V0:.*]] = load i8**, i8*** %[[DST_ADDR]], align 8
anatofuz
parents:
diff changeset
43 // CHECK: call void @llvm.objc.storeStrong(i8** %[[V0]], i8* null)
anatofuz
parents:
diff changeset
44 // CHECK: ret void