minix/external/bsd/llvm/dist/clang/test/CodeGen/debug-info-block-decl.c
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

19 lines
573 B
C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fblocks -emit-llvm -o - %s | FileCheck %s
// Assignment and block entry should point to the same line.
// rdar://problem/14039866
// CHECK: define{{.*}}@main()
// CHECK: store{{.*}}bitcast{{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]]
// CHECK: define {{.*}} @__main_block_invoke
// CHECK: dbg ![[BLOCK_ENTRY:[0-9]+]]
int main()
{
// CHECK: [[ASSIGNMENT]] = metadata !{i32 [[@LINE+2]],
// CHECK: [[BLOCK_ENTRY]] = metadata !{i32 [[@LINE+1]],
int (^blockptr)(void) = ^(void) {
return 0;
};
return blockptr();
}