xref: /llvm-project/clang/test/CodeGen/debug-info-block-decl.c (revision 094572701dce4aaf36f4521d6cf750420d39f206)
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 
4 // CHECK: define{{.*}}@main()
5 // CHECK: store {{.*}}, !dbg ![[ASSIGNMENT:[0-9]+]]
6 // CHECK: define {{.*}} @__main_block_invoke
7 // CHECK: , ![[BLOCK_ENTRY:[0-9]+]])
8 
main(void)9 int main(void)
10 {
11 // CHECK: [[ASSIGNMENT]] = !DILocation(line: [[@LINE+2]],
12 // CHECK: [[BLOCK_ENTRY]] = !DILocation(line: [[@LINE+1]],
13     int (^blockptr)(void) = ^(void) {
14       return 0;
15     };
16     return blockptr();
17 }
18 
19