llvm.org GIT mirror llvm / d9827ce
IR: Fix type-refs in testcase from r266548 There's a hole in the verifier right now: if a module has no compile units, it never checks that all the string-based DITypeRefs get resolved. As a result, this testcase didn't fail the verifier, even there were references to `!"has-uuid"` instead of `!"uuid"` (the former was a composite type's 'name:' field, the latter its 'identifier:' field). I'm currently working on removing string-based type refs entirely, and this testcase started failing (because the upgrade script can't resolve the type refs). Rather than fixing the (about-to-be-removed) hole in the verifier, I'm just going to fix the test so that my upgrade script handles it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@266553 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan P. N. Exon Smith 4 years ago
1 changed file(s) with 11 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
1212 !2 = !DIFile(filename: "path/to/other", directory: "/path/to/dir")
1313
1414 ; Define an identified type with fields and functions.
15 ; CHECK-NEXT: !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "has-uuid",
16 ; CHECK-NEXT: !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"has-uuid", file: !1
17 ; CHECK-NEXT: !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"has-uuid", file: !1
18 ; CHECK-NEXT: !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"has-uuid", file: !1
19 ; CHECK-NEXT: !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"has-uuid", file: !1
15 ; CHECK-NEXT: !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "has-uuid",{{.*}}, identifier: "uuid")
16 ; CHECK-NEXT: !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !1
17 ; CHECK-NEXT: !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"uuid", file: !1
18 ; CHECK-NEXT: !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !1
19 ; CHECK-NEXT: !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"uuid", file: !1
2020 !3 = !DICompositeType(tag: DW_TAG_structure_type, name: "has-uuid", file: !1, line: 2, size: 64, align: 32, identifier: "uuid")
21 !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"has-uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
22 !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"has-uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
23 !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"has-uuid", file: !1, isDefinition: false)
24 !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"has-uuid", file: !1, isDefinition: false)
21 !4 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
22 !5 = !DIDerivedType(tag: DW_TAG_member, name: "field2", scope: !"uuid", file: !1, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
23 !6 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !1, isDefinition: false)
24 !7 = !DISubprogram(name: "foo", linkageName: "foo2", scope: !"uuid", file: !1, isDefinition: false)
2525
2626 ; Define an un-identified type with fields and functions.
2727 ; CHECK-NEXT: !8 = !DICompositeType(tag: DW_TAG_structure_type, name: "no-uuid", file: !1
4444
4545 ; Add duplicate fields and members of "has-uuid" in a different file. These
4646 ; should be merged.
47 !15 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"has-uuid", file: !2, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
48 !16 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"has-uuid", file: !2, isDefinition: false)
47 !15 = !DIDerivedType(tag: DW_TAG_member, name: "field1", scope: !"uuid", file: !2, line: 4, baseType: !0, size: 32, align: 32, offset: 32)
48 !16 = !DISubprogram(name: "foo", linkageName: "foo1", scope: !"uuid", file: !2, isDefinition: false)
4949
5050 ; CHECK-NEXT: !15 = !{!4, !6}
5151 ; CHECK-NOT: !DIDerivedType