Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / DebugInfo / X86 / dwarfdump-str-offsets-v4-dwarf64-dwo.s
blob41122088f97d5e7b89e6ca28a32ee7ca0a417b6f
1 ## This tests dumping a .debug_str_offsets.dwo section which is referenced by
2 ## DWARF64 pre-v5 units and dumping attributes in such units which use the
3 ## DW_FORM_strx form.
5 # RUN: llvm-mc -triple x86_64 %s -filetype=obj -o - | \
6 # RUN: llvm-dwarfdump -v - | \
7 # RUN: FileCheck %s
9 # CHECK: .debug_info.dwo contents:
10 # CHECK: Compile Unit:
11 # CHECK: DW_TAG_compile_unit [1]
12 # CHECK-NEXT: DW_AT_name [DW_FORM_strx] (indexed (00000000) string = "Compilation Unit")
14 # CHECK: .debug_types.dwo contents:
15 # CHECK: Type Unit:
16 # CHECK: DW_TAG_type_unit [2] *
17 # CHECK-NEXT: DW_AT_name [DW_FORM_strx] (indexed (00000001) string = "Type Unit")
18 # CHECK: DW_TAG_structure_type [3]
19 # CHECK-NEXT: DW_AT_name [DW_FORM_strx] (indexed (00000002) string = "Structure")
21 # CHECK: .debug_str.dwo contents:
22 # CHECK-NEXT: 0x00000000: "Compilation Unit"
23 # CHECK-NEXT: 0x00000011: "Type Unit"
24 # CHECK-NEXT: 0x0000001b: "Structure"
26 # CHECK: .debug_str_offsets.dwo contents:
27 # CHECK-NEXT: 0x00000000: Contribution size = 24, Format = DWARF64, Version = 4
28 # CHECK-NEXT: 0x00000000: 0000000000000000 "Compilation Unit"
29 # CHECK-NEXT: 0x00000008: 0000000000000011 "Type Unit"
30 # CHECK-NEXT: 0x00000010: 000000000000001b "Structure"
32 .section .debug_str.dwo, "MSe", @progbits, 1
33 .LStr0:
34 .asciz "Compilation Unit"
35 .LStr1:
36 .asciz "Type Unit"
37 .LStr2:
38 .asciz "Structure"
40 .section .debug_str_offsets.dwo, "e", @progbits
41 .quad .LStr0-.debug_str.dwo # 0: "Compilation Unit"
42 .quad .LStr1-.debug_str.dwo # 1: "Type Unit"
43 .quad .LStr2-.debug_str.dwo # 2: "Structure"
45 .section .debug_abbrev.dwo, "e", @progbits
46 .uleb128 0x01 # Abbrev code
47 .uleb128 0x11 # DW_TAG_compile_unit
48 .byte 0x00 # DW_CHILDREN_no
49 .uleb128 0x03 # DW_AT_name
50 .uleb128 0x1a # DW_FORM_strx
51 .byte 0x00 # EOM(1)
52 .byte 0x00 # EOM(2)
53 .uleb128 0x02 # Abbrev code
54 .uleb128 0x41 # DW_TAG_type_unit
55 .byte 0x01 # DW_CHILDREN_yes
56 .uleb128 0x03 # DW_AT_name
57 .uleb128 0x1a # DW_FORM_strx
58 .byte 0x00 # EOM(1)
59 .byte 0x00 # EOM(2)
60 .uleb128 0x03 # Abbrev code
61 .uleb128 0x13 # DW_TAG_structure_type
62 .byte 0x00 # DW_CHILDREN_no (no members)
63 .uleb128 0x03 # DW_AT_name
64 .uleb128 0x1a # DW_FORM_strx
65 .byte 0x00 # EOM(1)
66 .byte 0x00 # EOM(2)
67 .byte 0x00 # EOM(3)
69 .section .debug_info.dwo, "e", @progbits
70 .long 0xffffffff # DWARF64 mark
71 .quad .LCUEnd-.LCUVer # Length
72 .LCUVer:
73 .short 4 # Version
74 .quad 0 # Abbrev. offset
75 .byte 8 # Address size
76 .uleb128 1 # Abbrev [1] DW_TAG_compile_unit
77 .uleb128 0 # DW_AT_name ("Compilation Unit")
78 .LCUEnd:
80 .section .debug_types.dwo, "e", @progbits
81 .LTU:
82 .long 0xffffffff # DWARF64 mark
83 .quad .LTUEnd-.LTUVer # Length
84 .LTUVer:
85 .short 4 # Version
86 .quad 0 # Abbrev. offset
87 .byte 8 # Address size
88 .quad 0x11110022ffffffff # Type Signature
89 .quad .LTUType-.LTU # Type offset
90 .uleb128 2 # Abbrev [2] DW_TAG_type_unit
91 .uleb128 1 # DW_AT_name ("Type Unit")
92 .LTUType:
93 .uleb128 3 # Abbrev [3] DW_TAG_structure_type
94 .uleb128 2 # DW_AT_name ("Structure")
95 .LTUEnd: