Debian Codegraph @

clang/test/CodeGenCXX/block-byref.cpp

raw
1 // RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - | FileCheck %s
2 // REQUIRES: x86-registered-target
3
4 // CHECK: @b ={{.*}} global i32 0,
5
6 // CHECK: define {{.*}}void @{{.*}}test{{.*}}_block_invoke(
7 // CHECK: store i32 2, ptr @b,
8 // CHECK: ret void
9
10 int b;
11
12 void test() {
13 int &a = b;
14 ^{ a = 2; };
15 }