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.
4
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, null}
14// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "__block_descriptor"
15// CHECK-NOT:              line
16// CHECK-SAME:            )
17
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]]}
26struct inStruct {
27  void (^voidBlockPtr)();
28  int (^intBlockPtr)(int);
29} is;
30