brintos

brintos / llvm-project-archived public Read only

0
0
Text · 337 B · 8dc01f9 Raw
16 lines · cpp
1// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - | FileCheck %s2// REQUIRES: x86-registered-target3 4// CHECK: @b ={{.*}} global i32 0,5 6// CHECK: define {{.*}}void @{{.*}}test{{.*}}_block_invoke(7// CHECK: store i32 2, ptr @b,8// CHECK: ret void9 10int b;11 12void test() {13  int &a = b;14  ^{ a = 2; };15}16