aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGenObjC/nontrivial-struct-param-init.m
blob: a13a09c77d8d18827bb67e055a1c31861fb62e66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -triple i386-apple-watchos6.0-simulator -emit-llvm -fblocks -fobjc-arc -o - %s | FileCheck %s

// CHECK: %[[STRUCT_S:.*]] = type { ptr }

typedef struct {
  id x;
} S;

// CHECK: define{{.*}} void @test0(ptr %[[A_0:.*]])
// CHECK: %[[A:.*]] = alloca %[[STRUCT_S]], align 4
// CHECK: %[[X:.*]] = getelementptr inbounds nuw %[[STRUCT_S]], ptr %[[A]], i32 0, i32 0
// CHECK: store ptr %[[A_0]], ptr %[[X]], align 4
// CHECK: call void @__destructor_4_s0(ptr %[[A]]) #2

void test0(S a) {
}