diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-20 20:35:17 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-02-20 20:35:17 +0000 |
commit | a5c57ccf2da8fed28a96f12c3227577c580ea0ad (patch) | |
tree | b2259107254c2a26569cf86c0882735b4a273d40 /llvm/test/Assembler/debug-info.ll | |
parent | e0c4f7eb819ed99b66af11466cc2905e78941562 (diff) | |
download | bcm5719-llvm-a5c57ccf2da8fed28a96f12c3227577c580ea0ad.tar.gz bcm5719-llvm-a5c57ccf2da8fed28a96f12c3227577c580ea0ad.zip |
IR: Change MDFile to directly store the filename/directory
In the old (well, current) schema, there are two types of file
references: untagged and tagged (the latter references the former).
!0 = !{!"filename", !"/directory"}
!1 = !{!"0x29", !1} ; DW_TAG_file_type [filename] [/directory]
The interface to `DIBuilder` universally takes the tagged version,
described by `DIFile`. However, most `file:` references actually use
the untagged version directly.
In the new hierarchy, I'm merging this into a single node: `MDFile`.
Originally I'd planned to keep the old schema unchanged until after I
moved the new hierarchy into place.
However, it turns out to be trivial to make `MDFile` match both nodes at
the same time.
- Anyone referencing !1 does so through `DIFile`, whose implementation
I need to gut anyway (as I do the rest of the `DIDescriptor`s).
- Anyone referencing !0 just references an `MDNode`, and expects a
node with two `MDString` operands.
This commit achieves that, and updates all the testcases for the parts
of the new hierarchy that used the two-node schema (I've replaced the
untagged nodes with `distinct !{}` to make the diff clear (otherwise the
metadata all gets renumbered); it might be worthwhile to come back and
delete those nodes and renumber the world, not sure).
llvm-svn: 230057
Diffstat (limited to 'llvm/test/Assembler/debug-info.ll')
-rw-r--r-- | llvm/test/Assembler/debug-info.ll | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/Assembler/debug-info.ll b/llvm/test/Assembler/debug-info.ll index 7d71a26c6ad..9b808bd2355 100644 --- a/llvm/test/Assembler/debug-info.ll +++ b/llvm/test/Assembler/debug-info.ll @@ -28,35 +28,35 @@ !9 = !MDBasicType(tag: DW_TAG_base_type) !10 = !MDBasicType(tag: DW_TAG_base_type, name: "", size: 0, align: 0, encoding: 0) -; CHECK-NEXT: !9 = !{!"path/to/file", !"/path/to/dir"} +; CHECK-NEXT: !9 = distinct !{} ; CHECK-NEXT: !10 = !MDFile(filename: "path/to/file", directory: "/path/to/dir") -; CHECK-NEXT: !11 = !{null, null} +; CHECK-NEXT: !11 = distinct !{} ; CHECK-NEXT: !12 = !MDFile(filename: "", directory: "") -!11 = !{!"path/to/file", !"/path/to/dir"} +!11 = distinct !{} !12 = !MDFile(filename: "path/to/file", directory: "/path/to/dir") -!13 = !{null, null} +!13 = distinct !{} !14 = !MDFile(filename: "", directory: "") ; CHECK-NEXT: !13 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !6, size: 32, align: 32) !15 = !MDDerivedType(tag: DW_TAG_pointer_type, baseType: !7, size: 32, align: 32) -; CHECK-NEXT: !14 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !9, line: 2, size: 32, align: 32, identifier: "MangledMyType") -; CHECK-NEXT: !15 = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !9, line: 3, scope: !14, size: 128, align: 32, offset: 64, flags: 3, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase") +; CHECK-NEXT: !14 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !10, line: 2, size: 32, align: 32, identifier: "MangledMyType") +; CHECK-NEXT: !15 = distinct !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !10, line: 3, scope: !14, size: 128, align: 32, offset: 64, flags: 3, elements: !16, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase") ; CHECK-NEXT: !16 = !{!17} -; CHECK-NEXT: !17 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !9, line: 4, scope: !15, baseType: !6, size: 32, align: 32, offset: 32, flags: 3) +; CHECK-NEXT: !17 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !10, line: 4, scope: !15, baseType: !6, size: 32, align: 32, offset: 32, flags: 3) ; CHECK-NEXT: !18 = !{!6} -; CHECK-NEXT: !19 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !9, line: 3, scope: !14, baseType: !15, size: 128, align: 32, offset: 64, flags: 3, elements: !20, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase") +; CHECK-NEXT: !19 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !10, line: 3, scope: !14, baseType: !15, size: 128, align: 32, offset: 64, flags: 3, elements: !20, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !15, templateParams: !18, identifier: "MangledBase") ; CHECK-NEXT: !20 = !{!21} ; CHECK-NEXT: !21 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !19, baseType: !15) ; CHECK-NEXT: !22 = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !6, size: 32, align: 32, extraData: !15) ; CHECK-NEXT: !23 = !MDCompositeType(tag: DW_TAG_structure_type) ; CHECK-NEXT: !24 = !MDCompositeType(tag: DW_TAG_structure_type, runtimeLang: DW_LANG_Cobol85) -!16 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !11, line: 2, size: 32, align: 32, identifier: "MangledMyType") -!17 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !11, line: 3, scope: !16, size: 128, align: 32, offset: 64, flags: 3, elements: !18, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase") +!16 = !MDCompositeType(tag: DW_TAG_structure_type, name: "MyType", file: !12, line: 2, size: 32, align: 32, identifier: "MangledMyType") +!17 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Base", file: !12, line: 3, scope: !16, size: 128, align: 32, offset: 64, flags: 3, elements: !18, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase") !18 = !{!19} -!19 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !11, line: 4, scope: !17, baseType: !7, size: 32, align: 32, offset: 32, flags: 3) +!19 = !MDDerivedType(tag: DW_TAG_member, name: "field", file: !12, line: 4, scope: !17, baseType: !7, size: 32, align: 32, offset: 32, flags: 3) !20 = !{!7} -!21 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !11, line: 3, scope: !16, baseType: !17, size: 128, align: 32, offset: 64, flags: 3, elements: !22, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase") +!21 = !MDCompositeType(tag: DW_TAG_structure_type, name: "Derived", file: !12, line: 3, scope: !16, baseType: !17, size: 128, align: 32, offset: 64, flags: 3, elements: !22, runtimeLang: DW_LANG_C_plus_plus_11, vtableHolder: !17, templateParams: !20, identifier: "MangledBase") !22 = !{!23} !23 = !MDDerivedType(tag: DW_TAG_inheritance, scope: !21, baseType: !17) !24 = !MDDerivedType(tag: DW_TAG_ptr_to_member_type, baseType: !7, size: 32, align: 32, extraData: !17) |