debug-info.ll 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ; RUN: llvm-as < %s | llvm-dis | llvm-as | llvm-dis | FileCheck %s
  2. ; RUN: verify-uselistorder %s
  3. ; CHECK: !named = !{!0, !0, !1, !2, !3, !4, !5, !6, !7, !8, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !27}
  4. !named = !{!0, !1, !2, !3, !4, !5, !6, !7, !8, !9, !10, !11, !12, !13, !14, !15, !16, !17, !18, !19, !20, !21, !22, !23, !24, !25, !26, !27, !28, !29, !30}
  5. ; CHECK: !0 = !DISubrange(count: 3)
  6. ; CHECK-NEXT: !1 = !DISubrange(count: 3, lowerBound: 4)
  7. ; CHECK-NEXT: !2 = !DISubrange(count: 3, lowerBound: -5)
  8. !0 = !DISubrange(count: 3)
  9. !1 = !DISubrange(count: 3, lowerBound: 0)
  10. !2 = !DISubrange(count: 3, lowerBound: 4)
  11. !3 = !DISubrange(count: 3, lowerBound: -5)
  12. ; CHECK-NEXT: !3 = !DIEnumerator(name: "seven", value: 7)
  13. ; CHECK-NEXT: !4 = !DIEnumerator(name: "negeight", value: -8)
  14. ; CHECK-NEXT: !5 = !DIEnumerator(name: "", value: 0)
  15. !4 = !DIEnumerator(name: "seven", value: 7)
  16. !5 = !DIEnumerator(name: "negeight", value: -8)
  17. !6 = !DIEnumerator(name: "", value: 0)
  18. ; CHECK-NEXT: !6 = !DIBasicType(name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
  19. ; CHECK-NEXT: !7 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
  20. ; CHECK-NEXT: !8 = !DIBasicType()
  21. !7 = !DIBasicType(tag: DW_TAG_base_type, name: "name", size: 1, align: 2, encoding: DW_ATE_unsigned_char)
  22. !8 = !DIBasicType(tag: DW_TAG_unspecified_type, name: "decltype(nullptr)")
  23. !9 = !DIBasicType()
  24. !10 = !DIBasicType(tag: DW_TAG_base_type, name: "", size: 0, align: 0, encoding: 0)
  25. ; CHECK-NEXT: !9 = !DITemplateTypeParameter(type: !6)
  26. ; CHECK-NEXT: !10 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
  27. ; CHECK-NEXT: !11 = distinct !{}
  28. ; CHECK-NEXT: !12 = !DIFile(filename: "", directory: "")
  29. !11 = !DITemplateTypeParameter(type: !7)
  30. !12 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
  31. !13 = distinct !{}
  32. !14 = !DIFile(filename: "", directory: "")
  33. ; CHECK-NEXT: !13 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32, align: 32)
  34. !15 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32)
  35. ; CHECK-NEXT: !14 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !10, line: 2, size: 32, align: 32, identifier: "MangledMyType")
  36. ; CHECK-NEXT: !15 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "Base", scope: !14, file: !10, line: 3, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
  37. ; CHECK-NEXT: !16 = !{!17}
  38. ; CHECK-NEXT: !17 = !DIDerivedType(tag: DW_TAG_member, name: "field", scope: !15, file: !10, line: 4, baseType: !6, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
  39. ; CHECK-NEXT: !18 = !{!9}
  40. ; CHECK-NEXT: !19 = !DICompositeType(tag: DW_TAG_structure_type, name: "Derived", scope: !14, file: !10, line: 3, baseType: !15, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !20, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase")
  41. ; CHECK-NEXT: !20 = !{!21}
  42. ; CHECK-NEXT: !21 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !19, baseType: !15)
  43. ; CHECK-NEXT: !22 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !6, size: 32, align: 32, extraData: !15)
  44. ; CHECK-NEXT: !23 = !DICompositeType(tag: DW_TAG_structure_type)
  45. ; CHECK-NEXT: !24 = !DICompositeType(tag: DW_TAG_structure_type, runtimeLang: DW_LANG_Cobol85)
  46. !16 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !12, line: 2, size: 32, align: 32, identifier: "MangledMyType")
  47. !17 = !DICompositeType(tag: DW_TAG_structure_type, name: "Base", scope: !16, file: !12, line: 3, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !18, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
  48. !18 = !{!19}
  49. !19 = !DIDerivedType(tag: DW_TAG_member, name: "field", scope: !17, file: !12, line: 4, baseType: !7, size: 32, align: 32, offset: 32, flags: DIFlagPublic)
  50. !20 = !{!11}
  51. !21 = !DICompositeType(tag: DW_TAG_structure_type, name: "Derived", scope: !16, file: !12, line: 3, baseType: !17, size: 128, align: 32, offset: 64, flags: DIFlagPublic, elements: !22, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase")
  52. !22 = !{!23}
  53. !23 = !DIDerivedType(tag: DW_TAG_inheritance, scope: !21, baseType: !17)
  54. !24 = !DIDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !7, size: 32, align: 32, extraData: !17)
  55. !25 = !DICompositeType(tag: DW_TAG_structure_type)
  56. !26 = !DICompositeType(tag: DW_TAG_structure_type, runtimeLang: 6)
  57. ; !25 = !{!7, !7}
  58. ; !26 = !DISubroutineType(flags: DIFlagPublic | DIFlagStaticMember, types: !25)
  59. ; !27 = !DISubroutineType(types: !25)
  60. !27 = !{!7, !7}
  61. !28 = !DISubroutineType(flags: DIFlagPublic | DIFlagStaticMember, types: !27)
  62. !29 = !DISubroutineType(flags: 0, types: !27)
  63. !30 = !DISubroutineType(types: !27)