Debian Codegraph @

clang/test/CodeGenObjC/property-array-type.m

raw
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2
3 struct _GLKMatrix4
4 {
5 float m[16];
6 };
7 typedef struct _GLKMatrix4 GLKMatrix4;
8
9 @interface NSObject @end
10
11 @interface MyProgram
12 - (void)setTransform:(float[16])transform;
13 @end
14
15 @interface ViewController
16 @property (nonatomic, assign) GLKMatrix4 transform;
17 @end
18
19 @implementation ViewController
20 - (void)viewDidLoad {
21 MyProgram *program;
22 program.transform = self.transform.m;
23 }
24 @end
25
26 // CHECK: [[REF_TEMP:%.*]] = alloca %struct._GLKMatrix4, align 4
27 // CHECK: [[M:%.*]] = getelementptr inbounds nuw %struct._GLKMatrix4, ptr [[REF_TEMP:%.*]], i32 0, i32 0
28 // CHECK: [[ARRAYDECAY:%.*]] = getelementptr inbounds [16 x float], ptr [[M]], i64 0, i64 0
29 // CHECK: [[SIX:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES
30 // CHECK: call void @objc_msgSend(ptr noundef [[SEVEN:%.*]], ptr noundef [[SIX]], ptr noundef [[ARRAYDECAY]])