1; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s 2; RUN: verify-uselistorder %s 3 4; CHECK: define void @_Z3foov() !dbg !9 5define void @_Z3foov() !dbg !9 { 6 ret void 7} 8 9; CHECK: !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} 10!named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12} 11 12!0 = !{null} 13!1 = distinct !DICompositeType(tag: DW_TAG_structure_type) 14!2 = !DIFile(filename: "path/to/file", directory: "/path/to/dir") 15!3 = !DISubroutineType(types: !0) 16!4 = distinct !DICompositeType(tag: DW_TAG_structure_type) 17!5 = distinct !{} 18!6 = distinct !{} 19 20; CHECK: !7 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !8) 21!7 = distinct !DISubprogram(unit: !8) 22 23!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang", 24 file: !2, 25 isOptimized: true, flags: "-O2", 26 splitDebugFilename: "abc.debug", emissionKind: 2) 27 28; CHECK: !9 = !DISubprogram(scope: null, isLocal: false, isDefinition: false, isOptimized: false) 29!9 = !DISubprogram(isDefinition: false) 30 31; CHECK: !10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, file: !2, line: 7, type: !3, isLocal: true, isDefinition: true, scopeLine: 8, containingType: !4, virtuality: DW_VIRTUALITY_pure_virtual, virtualIndex: 10, thisAdjustment: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !8, templateParams: !5, declaration: !9, variables: !6) 32!10 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, 33 file: !2, line: 7, type: !3, isLocal: true, 34 isDefinition: true, scopeLine: 8, 35 containingType: !4, 36 virtuality: DW_VIRTUALITY_pure_virtual, 37 virtualIndex: 10, thisAdjustment: 3, flags: DIFlagPrototyped, 38 isOptimized: true, unit: !8, templateParams: !5, 39 declaration: !9, variables: !6) 40 41; CHECK: !11 = distinct !DISubprogram 42; CHECK-SAME: virtualIndex: 0, 43!11 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, 44 file: !2, line: 7, type: !3, isLocal: true, 45 isDefinition: true, scopeLine: 8, 46 containingType: !4, 47 virtuality: DW_VIRTUALITY_pure_virtual, 48 virtualIndex: 0, 49 flags: DIFlagPrototyped, isOptimized: true, 50 unit: !8, templateParams: !5, declaration: !9, 51 variables: !6) 52 53; CHECK: !12 = distinct !DISubprogram 54; CHECK-NOT: virtualIndex 55!12 = distinct !DISubprogram(name: "foo", linkageName: "_Zfoov", scope: !1, 56 file: !2, line: 7, type: !3, isLocal: true, 57 isDefinition: true, scopeLine: 8, 58 containingType: !4, 59 virtuality: DW_VIRTUALITY_none, 60 flags: DIFlagPrototyped, isOptimized: true, 61 unit: !8, 62 templateParams: !5, declaration: !9, variables: !6) 63 64!13 = !{i32 1, !"Debug Info Version", i32 3} 65!llvm.module.flags = !{!13} 66!llvm.dbg.cu = !{!8} 67