1 // RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-darwin -S -emit-llvm -o - -O2 -disable-llvm-passes %s | FileCheck %s
2 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -S -emit-llvm -o - -O2 -disable-llvm-passes %s | FileCheck %s
3 // RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-darwin -fobjc-arc -S -emit-llvm -o - -O2 -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,ARC
4 // RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -fobjc-arc -S -emit-llvm -o - -O2 -disable-llvm-passes %s | FileCheck %s --check-prefixes=CHECK,ARC
6 struct stret { int x[100]; };
7 struct stret one = {{1}};
10 +(struct stret) method;
11 +(struct stret) methodConsuming:(id __attribute__((ns_consumed)))consumed;
14 void foo(id o, id p) {
16 // CHECK: @llvm.lifetime.start
17 // CHECK: call void bitcast {{.*}} @objc_msgSend
18 // CHECK: @llvm.lifetime.end
19 // CHECK-NOT: call void @llvm.memset
21 [o methodConsuming:p];
22 // ARC: [[T0:%.*]] = icmp eq i8*
25 // CHECK: @llvm.lifetime.start
26 // CHECK: call void bitcast {{.*}} @objc_msgSend
27 // CHECK: @llvm.lifetime.end
30 // ARC: call void @llvm.objc.release
33 // CHECK-NOT: call void @llvm.memset