1 // RUN: %clang_cc1 %s -emit-llvm -o - -fblocks -triple x86_64-apple-darwin10 | FileCheck %s 2 // rdar://9309454 3 4 typedef struct { int v; } RetType; 5 6 RetType func(); 7 8 int main () { 9 __attribute__((__blocks__(byref))) RetType a = {100}; 10 11 a = func(); 12 } 13 // CHECK: [[C1:%.*]] = call i32 (...)* @func() 14 // CHECK-NEXT: [[CO:%.*]] = getelementptr 15 // CHECK-NEXT: store i32 [[C1]], i32* [[CO]] 16 // CHECK-NEXT: [[FORWARDING:%.*]] = getelementptr inbounds [[BR:%.*]]* [[A:%.*]], i32 0, i32 1 17 // CHECK-NEXT: [[O:%.*]] = load [[BR]]** [[FORWARDING]] 18