30 lines · c
1// RUN: %clang_cc1 -fblocks -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s2// Verify that the desired debugging type is generated for a structure3// member that is a pointer to a block.4 5// CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope6// CHECK-NOT: line7// 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: line16// CHECK-SAME: )17 18// CHECK: !DICompositeType(tag: DW_TAG_structure_type, scope19// CHECK-NOT: line20// 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)(void);28 int (^intBlockPtr)(int);29} is;30