xref: /llvm-project/clang/test/CodeGenObjC/nontrivial-struct-param-init.m (revision 94473f4db6a6f5f12d7c4081455b5b596094eac5)
1// RUN: %clang_cc1 -triple i386-apple-watchos6.0-simulator -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s
2
3// CHECK: %[[STRUCT_S:.*]] = type { ptr }
4
5typedef struct {
6  id x;
7} S;
8
9// CHECK: define{{.*}} void @test0(ptr %[[A_0:.*]])
10// CHECK: %[[A:.*]] = alloca %[[STRUCT_S]], align 4
11// CHECK: %[[X:.*]] = getelementptr inbounds nuw %[[STRUCT_S]], ptr %[[A]], i32 0, i32 0
12// CHECK: store ptr %[[A_0]], ptr %[[X]], align 4
13// CHECK: call void @__destructor_4_s0(ptr %[[A]]) #2
14
15void test0(S a) {
16}
17