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