Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGenObjCXX / synthesized-property-cleanup.mm
blob6d9c617ac419370ca864fee37dc15eaeb11127d0
1 // RUN: %clang_cc1 -triple arm64e-apple-ios13.0 -debug-info-kind=standalone -fobjc-arc -fsanitize=nullability-return \
2 // RUN:   %s -emit-llvm -o - | FileCheck %s
4 @interface NSObject
5 + (id)alloc;
6 @end
8 @interface NSString : NSObject
9 @end
11 // CHECK: define {{.*}}@"\01-[MyData setData:]"
12 // CHECK: [[DATA:%.*]] = alloca %struct.Data
13 // CHECK: call noundef ptr @_ZN4DataD1Ev(ptr {{[^,]*}} [[DATA]]){{.*}}, !dbg [[DATA_PROPERTY_LOC:![0-9]+]]
14 // CHECK-NEXT: ret void
16 // CHECK: define {{.*}}@"\01-[MyData string]"
17 // CHECK: call void @__ubsan_handle_nullability_return_v1_abort{{.*}}, !dbg [[STRING_PROPERTY_LOC:![0-9]+]]
18 // CHECK: ret
20 @interface MyData : NSObject
21 struct Data {
22     NSString *name;
25 // CHECK-DAG: [[DATA_PROPERTY_LOC]] = !DILocation(line: [[@LINE+1]]
26 @property struct Data data;
28 // CHECK-DAG: [[STRING_PROPERTY_LOC]] = !DILocation(line: [[@LINE+1]]
29 @property (nonnull) NSString *string;
31 @end
33 @implementation MyData
34 @end