annotate clang/test/CodeGenObjCXX/property-object-reference-2.mm @ 236:c4bab56944e8 llvm-original

LLVM 16
author kono
date Wed, 09 Nov 2022 17:45:10 +0900
parents 79ff65ed7e25
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
1 // RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-10.7 -emit-llvm -o - | FileCheck %s
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
2 // RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-unknown-freebsd -fobjc-runtime=gnustep-1.7 -emit-llvm -o - | FileCheck -check-prefix=CHECK-GNUSTEP %s
150
anatofuz
parents:
diff changeset
3 // rdar://6137845
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 extern int DEFAULT();
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 struct TCPPObject
anatofuz
parents:
diff changeset
8 {
anatofuz
parents:
diff changeset
9 TCPPObject();
anatofuz
parents:
diff changeset
10 ~TCPPObject();
anatofuz
parents:
diff changeset
11 TCPPObject(const TCPPObject& inObj, int i = DEFAULT());
anatofuz
parents:
diff changeset
12 TCPPObject& operator=(const TCPPObject& inObj);
anatofuz
parents:
diff changeset
13 int filler[64];
anatofuz
parents:
diff changeset
14 };
anatofuz
parents:
diff changeset
15
anatofuz
parents:
diff changeset
16
anatofuz
parents:
diff changeset
17 @interface MyDocument
anatofuz
parents:
diff changeset
18 {
anatofuz
parents:
diff changeset
19 @private
anatofuz
parents:
diff changeset
20 TCPPObject _cppObject;
anatofuz
parents:
diff changeset
21 TCPPObject _cppObject1;
anatofuz
parents:
diff changeset
22 }
anatofuz
parents:
diff changeset
23 @property (assign, readwrite, atomic) const TCPPObject MyProperty;
anatofuz
parents:
diff changeset
24 @property (assign, readwrite, atomic) const TCPPObject MyProperty1;
anatofuz
parents:
diff changeset
25 @end
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 @implementation MyDocument
anatofuz
parents:
diff changeset
28 @synthesize MyProperty = _cppObject;
anatofuz
parents:
diff changeset
29 @synthesize MyProperty1 = _cppObject1;
anatofuz
parents:
diff changeset
30 @end
anatofuz
parents:
diff changeset
31
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
32 // CHECK-LABEL: define internal void @__copy_helper_atomic_property_(%struct.TCPPObject* noundef %0, %struct.TCPPObject* noundef %1) #
150
anatofuz
parents:
diff changeset
33 // CHECK: [[TWO:%.*]] = load %struct.TCPPObject*, %struct.TCPPObject** [[ADDR:%.*]], align 8
anatofuz
parents:
diff changeset
34 // CHECK: [[THREE:%.*]] = load %struct.TCPPObject*, %struct.TCPPObject** [[ADDR1:%.*]], align 8
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
35 // CHECK: [[CALL:%.*]] = call noundef i32 @_Z7DEFAULTv()
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
36 // CHECK: call void @_ZN10TCPPObjectC1ERKS_i(%struct.TCPPObject* {{[^,]*}} [[TWO]], %struct.TCPPObject* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[THREE]], i32 noundef [[CALL]])
150
anatofuz
parents:
diff changeset
37 // CHECK: ret void
anatofuz
parents:
diff changeset
38
anatofuz
parents:
diff changeset
39 // CHECK: define internal void @"\01-[MyDocument MyProperty]"(
anatofuz
parents:
diff changeset
40 // CHECK: [[ONE:%.*]] = bitcast i8* [[ADDPTR:%.*]] to %struct.TCPPObject*
anatofuz
parents:
diff changeset
41 // CHECK: [[TWO:%.*]] = bitcast %struct.TCPPObject* [[ONE]] to i8*
anatofuz
parents:
diff changeset
42 // CHECK: [[THREE:%.*]] = bitcast %struct.TCPPObject* [[AGGRESULT:%.*]] to i8*
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
43 // CHECK: call void @objc_copyCppObjectAtomic(i8* noundef [[THREE]], i8* noundef [[TWO]], i8* noundef bitcast (void (%struct.TCPPObject*, %struct.TCPPObject*)* @__copy_helper_atomic_property_ to i8*))
150
anatofuz
parents:
diff changeset
44 // CHECK: ret void
anatofuz
parents:
diff changeset
45
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
46 // CHECK-LABEL: define internal void @__assign_helper_atomic_property_(%struct.TCPPObject* noundef %0, %struct.TCPPObject* noundef %1) #
150
anatofuz
parents:
diff changeset
47 // CHECK: [[THREE:%.*]] = load %struct.TCPPObject*, %struct.TCPPObject** [[ADDR1:%.*]], align 8
anatofuz
parents:
diff changeset
48 // CHECK: [[TWO:%.*]] = load %struct.TCPPObject*, %struct.TCPPObject** [[ADDR:%.*]], align 8
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
49 // CHECK: [[CALL:%.*]] = call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.TCPPObject* @_ZN10TCPPObjectaSERKS_(%struct.TCPPObject* {{[^,]*}} [[TWO]], %struct.TCPPObject* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) [[THREE]])
150
anatofuz
parents:
diff changeset
50 // CHECK: ret void
anatofuz
parents:
diff changeset
51
anatofuz
parents:
diff changeset
52 // CHECK: define internal void @"\01-[MyDocument setMyProperty:]"(
anatofuz
parents:
diff changeset
53 // CHECK: [[ONE:%.*]] = bitcast i8* [[ADDRPTR:%.*]] to %struct.TCPPObject*
anatofuz
parents:
diff changeset
54 // CHECK: [[TWO:%.*]] = bitcast %struct.TCPPObject* [[ONE]] to i8*
anatofuz
parents:
diff changeset
55 // CHECK: [[THREE:%.*]] = bitcast %struct.TCPPObject* [[MYPROPERTY:%.*]] to i8*
236
c4bab56944e8 LLVM 16
kono
parents: 221
diff changeset
56 // CHECK: call void @objc_copyCppObjectAtomic(i8* noundef [[TWO]], i8* noundef [[THREE]], i8* noundef bitcast (void (%struct.TCPPObject*, %struct.TCPPObject*)* @__assign_helper_atomic_property_ to i8*))
150
anatofuz
parents:
diff changeset
57 // CHECK: ret void
anatofuz
parents:
diff changeset
58
anatofuz
parents:
diff changeset
59 // CHECK-GNUSTEP: objc_getCppObjectAtomic
anatofuz
parents:
diff changeset
60 // CHECK-GNUSTEP: objc_setCppObjectAtomic