2015-10-08 12:24:12 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -fblocks -emit-llvm -o - %s | FileCheck %s
|
2013-06-18 08:27:36 +08:00
|
|
|
// 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
|
2015-11-06 06:04:14 +08:00
|
|
|
// CHECK: , !dbg ![[BLOCK_ENTRY:[0-9]+]]
|
2013-06-18 08:27:36 +08:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2015-04-30 00:40:08 +08:00
|
|
|
// CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
|
|
|
|
// CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
|
2013-06-18 08:27:36 +08:00
|
|
|
int (^blockptr)(void) = ^(void) {
|
|
|
|
return 0;
|
|
|
|
};
|
|
|
|
return blockptr();
|
|
|
|
}
|
|
|
|
|