llvm-project
29 строк · 832.0 Байт
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
2
3struct _GLKMatrix4
4{
5float m[16];
6};
7typedef 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 {
21MyProgram *program;
22program.transform = self.transform.m;
23}
24@end
25
26// CHECK: [[M:%.*]] = getelementptr inbounds %struct._GLKMatrix4, ptr [[TMP:%.*]], i32 0, i32 0
27// CHECK: [[ARRAYDECAY:%.*]] = getelementptr inbounds [16 x float], ptr [[M]], i64 0, i64 0
28// CHECK: [[SIX:%.*]] = load ptr, ptr @OBJC_SELECTOR_REFERENCES
29// CHECK: call void @objc_msgSend(ptr noundef [[SEVEN:%.*]], ptr noundef [[SIX]], ptr noundef [[ARRAYDECAY]])
30