• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang_cc1 -triple x86_64-apple-darwin10 -debug-info-kind=limited -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 
main()10 int main()
11 {
12 // CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
13 // CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
14     int (^blockptr)(void) = ^(void) {
15       return 0;
16     };
17     return blockptr();
18 }
19 
20