[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / CodeGenObjC / compound-literal-property-access.m
blob1a1a93b2e8316f09ea8fcb211a383d7646d73130
1 // RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
2 // rdar://20407999
4 typedef __attribute__((__ext_vector_type__(2))) float vector_float2;
6 @interface GPAgent2D
7 @property (nonatomic, assign) vector_float2 position;
8 @end
10 @interface GPGoal @end
12 @implementation GPGoal
13 -(void)getForce {
14     GPAgent2D* targetAgent;
15     (vector_float2){targetAgent.position.x, targetAgent.position.y};
17 @end
19 // CHECK: [[CL:%.*]] = alloca <2 x float>, align 8
20 // CHECK: store <2 x float> [[VECINIT:%.*]], <2 x float>* [[CL]]
21 // CHECK: [[FOURTEEN:%.*]] = load <2 x float>, <2 x float>* [[CL]]