blob: 5476d8874bf49fbfd8ade71d73fc7fa73fa77d01 [file] [log] [blame]
Adrian Prantlde5fde02013-06-18 00:27:36 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -g -fblocks -emit-llvm -o - %s | FileCheck %s
2// Assignment and block entry should point to the same line.
3// rdar://problem/14039866
4
5// CHECK: define{{.*}}@main()
6// CHECK: store{{.*}}bitcast{{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]]
7// CHECK: define {{.*}} @__main_block_invoke
8// CHECK: dbg ![[BLOCK_ENTRY:[0-9]+]]
9
10int main()
11{
Duncan P. N. Exon Smith9dd4e4e2015-04-29 16:40:08 +000012// CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
13// CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
Adrian Prantlde5fde02013-06-18 00:27:36 +000014 int (^blockptr)(void) = ^(void) {
15 return 0;
16 };
17 return blockptr();
18}
19