[Reland][Runtimes] Merge 'compile_commands.json' files from runtimes build (#116303)
[llvm-project.git] / clang / test / CodeGen / debug-info-block.c
bloba4b8fde1c74feabbf4f7304aff7b42044c1c90d8
1 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
2 // Verify that the desired debugging type is generated for a structure
3 // member that is a pointer to a block.
5 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope
6 // CHECK-NOT: line
7 // CHECK-SAME: elements: ![[ELEMS1:.*]])
8 // CHECK: ![[ELEMS1]] = {{.*, .*, .*,}} ![[FPEL1:.*]], {{.*}}
9 // CHECK: ![[INT:.*]] = !DIBasicType(name: "int"
10 // CHECK: ![[FPEL1]] = {{.*}}"__FuncPtr", {{.*}}, baseType: ![[FPTY1:[0-9]+]]
11 // CHECK: ![[FPTY1]] = {{.*}}baseType: ![[FNTY1:[0-9]+]]
12 // CHECK: ![[FNTY1]] = !DISubroutineType(types: ![[VOIDVOID:[0-9]+]])
13 // CHECK: ![[VOIDVOID]] = !{null}
14 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
15 // CHECK-NOT: line
16 // CHECK-SAME: )
18 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope
19 // CHECK-NOT: line
20 // CHECK-SAME: elements: ![[ELEMS2:.*]])
21 // CHECK: ![[ELEMS2]] = {{.*,.*,.*}}, ![[FPEL2:.*]], {{.*}}
22 // CHECK: ![[FPEL2]] = {{.*}}"__FuncPtr", {{.*}}, baseType: ![[FPTY2:[0-9]+]]
23 // CHECK: ![[FPTY2]] = {{.*}}baseType: ![[FNTY2:[0-9]+]]
24 // CHECK: ![[FNTY2]] = !DISubroutineType(types: ![[INTINT:[0-9]+]])
25 // CHECK: ![[INTINT]] = !{![[INT]], ![[INT]]}
26 struct inStruct {
27 void (^voidBlockPtr)(void);
28 int (^intBlockPtr)(int);
29 } is;