1 ; RUN: llvm-dis < %s.bc | FileCheck %s
2 ; RUN: verify-uselistorder %s.bc
4 ; Establish a stable order.
5 !named = !{!0, !1, !2, !3, !4, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16}
7 ; Since this is incomplete debug info the !dbg attachement will be stripped.
8 ; This doesn't matter for what is being tested here.
9 ; CHECK: @G1 = global i32 0
11 ; CHECK: !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
12 ; CHECK-NEXT: !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1"{{.*}}, identifier: "T1")
13 ; CHECK-NEXT: !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", scope: !1{{.*}}, baseType: !1, vtableHolder: !1, identifier: "T2")
14 ; CHECK-NEXT: !3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", scope: !1{{.*}}, baseType: !2)
15 ; CHECK-NEXT: !4 = !DISubroutineType(types: !5)
16 ; CHECK-NEXT: !5 = !{!1, !2}
17 ; CHECK-NEXT: !6 = !DISubprogram(scope: !1,{{.*}} containingType: !1{{[,)]}}
18 ; CHECK-NEXT: !7 = !DILocalVariable(name: "V1", scope: !6, type: !2)
19 ; CHECK-NEXT: !8 = !DIObjCProperty(name: "P1", type: !1)
20 ; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !1)
21 ; CHECK-NEXT: !10 = !DIGlobalVariable(name: "G",{{.*}} type: !1,
22 ; CHECK-NEXT: !11 = !DITemplateValueParameter(type: !1, value: ptr @G1)
23 ; CHECK-NEXT: !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !1)
24 ; CHECK-NEXT: !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !14, identifier: "T3")
25 ; CHECK-NEXT: !14 = !{!15}
26 ; CHECK-NEXT: !15 = !DISubprogram(scope: !13,
27 ; CHECK-NEXT: !16 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type,{{.*}} extraData: !13)
29 !0 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
30 !1 = !DICompositeType(tag: DW_TAG_structure_type, name: "T1", file: !0, identifier: "T1")
31 !2 = !DICompositeType(tag: DW_TAG_structure_type, name: "T2", file: !0, scope: !"T1", baseType: !"T1", vtableHolder: !"T1", identifier: "T2")
32 !3 = !DIDerivedType(tag: DW_TAG_member, name: "M1", file: !0, scope: !"T1", baseType: !"T2")
33 !4 = !DISubroutineType(types: !5)
35 !6 = !DISubprogram(scope: !"T1", isDefinition: false, containingType: !"T1")
36 !7 = !DILocalVariable(name: "V1", scope: !6, type: !"T2")
37 !8 = !DIObjCProperty(name: "P1", type: !"T1")
38 !9 = !DITemplateTypeParameter(type: !"T1")
39 !10 = !DIGlobalVariable(name: "G", type: !"T1", isDefinition: false, variable: i32* @G1)
40 !11 = !DITemplateValueParameter(type: !"T1", value: i32* @G1)
41 !12 = !DIImportedEntity(tag: DW_TAG_imported_module, name: "T2", scope: !0, entity: !"T1")
42 !13 = !DICompositeType(tag: DW_TAG_structure_type, name: "T3", file: !0, elements: !14, identifier: "T3")
44 !15 = !DISubprogram(scope: !"T3", isDefinition: false)
45 !16 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !4, extraData: !"T3")