diff options
Diffstat (limited to 'test/CodeGenCXX/debug-info-class.cpp')
-rw-r--r-- | test/CodeGenCXX/debug-info-class.cpp | 84 |
1 files changed, 57 insertions, 27 deletions
diff --git a/test/CodeGenCXX/debug-info-class.cpp b/test/CodeGenCXX/debug-info-class.cpp index 55d5653..a63efe5 100644 --- a/test/CodeGenCXX/debug-info-class.cpp +++ b/test/CodeGenCXX/debug-info-class.cpp @@ -90,33 +90,63 @@ int main(int argc, char **argv) { // CHECK: invoke {{.+}} @_ZN1BD1Ev(%class.B* %b) // CHECK-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]] // CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]] -// CHECK: DW_TAG_structure_type ] [foo] -// CHECK: DW_TAG_class_type ] [bar] -// CHECK: DW_TAG_union_type ] [baz] -// CHECK: DW_TAG_class_type ] [B] {{.*}} [def] -// CHECK: !"0xd\00_vptr$B\00{{.*}}\0064", {{.*}} ; [ DW_TAG_member ] - -// CHECK: [[C:![0-9]*]] = {{.*}} [[C_MEM:![0-9]*]], !"_ZTS1C", null, !"_ZTS1C"} ; [ DW_TAG_structure_type ] [C] {{.*}} [def] +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "foo" +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "bar" +// CHECK: !DICompositeType(tag: DW_TAG_union_type, name: "baz" +// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "B" +// CHECK-NOT: DIFlagFwdDecl +// CHECK-SAME: ){{$}} +// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "_vptr$B", +// CHECK-SAME: DIFlagArtificial + +// CHECK: ![[INT:[0-9]+]] = !DIBasicType(name: "int" + +// CHECK: [[C:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "C", +// CHECK-NOT: DIFlagFwdDecl +// CHECK-SAME: elements: [[C_MEM:![0-9]*]] +// CHECK-SAME: vtableHolder: !"_ZTS1C" +// CHECK-SAME: identifier: "_ZTS1C" // CHECK: [[C_MEM]] = !{[[C_VPTR:![0-9]*]], [[C_S:![0-9]*]], [[C_DTOR:![0-9]*]]} -// CHECK: [[C_VPTR]] = {{.*}} ; [ DW_TAG_member ] [_vptr$C] {{.*}} [artificial] -// CHECK: [[C_S]] = {{.*}} ; [ DW_TAG_member ] [s] {{.*}} [static] [from int] -// CHECK: [[C_DTOR]] = {{.*}} ; [ DW_TAG_subprogram ] {{.*}} [~C] - -// CHECK: null, null, null, !"_ZTS1D"} ; [ DW_TAG_structure_type ] [D] {{.*}} [decl] -// CHECK: null, null, null, !"_ZTS1E"} ; [ DW_TAG_structure_type ] [E] {{.*}} [decl] -// CHECK: [[F:![0-9]*]] = {{.*}} null, null, null, !"_ZTS1F"} ; [ DW_TAG_structure_type ] [F] {{.*}} [decl] - -// CHECK: null, null, null, !"_ZTS1G"} ; [ DW_TAG_structure_type ] [G] {{.*}} [decl] -// CHECK: [[G_INNER_MEM:![0-9]*]], null, null, !"_ZTSN1G5innerE"} ; [ DW_TAG_structure_type ] [inner] [line 50, {{.*}} [def] +// CHECK: [[C_VPTR]] = !DIDerivedType(tag: DW_TAG_member, name: "_vptr$C" +// CHECK-SAME: DIFlagArtificial +// CHECK: [[C_S]] = !DIDerivedType(tag: DW_TAG_member, name: "s" +// CHECK-SAME: baseType: ![[INT]] +// CHECK-SAME: DIFlagStaticMember +// CHECK: [[C_DTOR]] = !DISubprogram(name: "~C" + +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "D" +// CHECK-SAME: DIFlagFwdDecl +// CHECK-SAME: identifier: "_ZTS1D" +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "E" +// CHECK-SAME: DIFlagFwdDecl +// CHECK-SAME: identifier: "_ZTS1E" +// CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F" +// CHECK-SAME: DIFlagFwdDecl +// CHECK-SAME: identifier: "_ZTS1F" + +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "G" +// CHECK-SAME: DIFlagFwdDecl +// CHECK-SAME: identifier: "_ZTS1G" +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "inner" +// CHECK: line: 50 +// CHECK-NOT: DIFlagFwdDecl +// CHECK-SAME: elements: [[G_INNER_MEM:![0-9]*]] +// CHECK-SAME: identifier: "_ZTSN1G5innerE" // CHECK: [[G_INNER_MEM]] = !{[[G_INNER_I:![0-9]*]]} -// CHECK: [[G_INNER_I]] = {{.*}} ; [ DW_TAG_member ] [j] {{.*}} [from int] - -// CHECK: ; [ DW_TAG_structure_type ] [A] -// CHECK: HdrSize -// CHECK: ; [ DW_TAG_structure_type ] [I] {{.*}} [def] +// CHECK: [[G_INNER_I]] = !DIDerivedType(tag: DW_TAG_member, name: "j" +// CHECK-SAME: baseType: ![[INT]] + +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "A" +// CHECK: !DIDerivedType(tag: DW_TAG_member, name: "HdrSize" +// CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "I" +// CHECK-NOT: DIFlagFwdDecl +// CHECK-SAME: ){{$}} // -// CHECK: !"_ZTS1D", {{.*}}, [[D_FUNC_DECL:![0-9]*]], {{![0-9]*}}} ; [ DW_TAG_subprogram ] {{.*}} [def] [func] -// CHECK: [[D_FUNC_DECL]] = !{!"0x2e\00func\00{{.*}}\000\00{{[0-9]+}}"{{.*}}, !"_ZTS1D", {{.*}}, null} ; [ DW_TAG_subprogram ] {{.*}} [func] - -// CHECK: ![[EXCEPTLOC]] = !MDLocation(line: 84, -// CHECK: ![[RETLOC]] = !MDLocation(line: 83, +// CHECK: !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D" +// CHECK-SAME: isDefinition: true +// CHECK-SAME: declaration: [[D_FUNC_DECL:![0-9]*]] +// CHECK: [[D_FUNC_DECL]] = !DISubprogram(name: "func",{{.*}} scope: !"_ZTS1D" +// CHECK-SAME: isDefinition: false + +// CHECK: ![[EXCEPTLOC]] = !DILocation(line: 84, +// CHECK: ![[RETLOC]] = !DILocation(line: 83, |