2013-06-18 08:27:36 +08:00
|
|
|
// 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()
|
|
|
|
{
|
2015-01-15 06:28:03 +08:00
|
|
|
// CHECK: [[ASSIGNMENT]] = !MDLocation(line: [[@LINE+2]],
|
|
|
|
// CHECK: [[BLOCK_ENTRY]] = !MDLocation(line: [[@LINE+1]],
|
2013-06-18 08:27:36 +08:00
|
|
|
int (^blockptr)(void) = ^(void) {
|
|
|
|
return 0;
|
|
|
|
};
|
|
|
|
return blockptr();
|
|
|
|
}
|
|
|
|
|