1 # This test sets non-zero Die Offset Base field in the accelerator table header,
2 # and makes sure it is *not* added to the DW_FORM_data*** forms.
4 # RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o %t
5 # RUN: llvm-dwarfdump -find=main %t | FileCheck %s
7 # CHECK: DW_TAG_subprogram
8 # CHECK-NEXT: DW_AT_name ("main")
9 # CHECK-NEXT: DW_AT_external
11 .section __DWARF,__debug_str,regular,debug
14 .asciz "Hand-written dwarf"
18 .section __DWARF,__debug_abbrev,regular,debug
19 .byte 1 # Abbreviation Code
20 .byte 17 # DW_TAG_compile_unit
21 .byte 1 # DW_CHILDREN_yes
22 .byte 37 # DW_AT_producer
23 .byte 14 # DW_FORM_strp
24 .byte 19 # DW_AT_language
25 .byte 5 # DW_FORM_data2
28 .byte 2 # Abbreviation Code
29 .byte 46 # DW_TAG_subprogram
30 .byte 0 # DW_CHILDREN_no
32 .byte 14 # DW_FORM_strp
33 .byte 63 # DW_AT_external
34 .byte 25 # DW_FORM_flag_present
39 .section __DWARF,__debug_info,regular,debug
41 .long Lcu_end0-Lcu_start0 # Length of Unit
43 .short 4 # DWARF version number
44 .long 0 # Offset Into Abbrev. Section
45 .byte 8 # Address Size (in bytes)
46 .byte 1 # Abbrev [1] DW_TAG_compile_unit
47 .long Lstring_producer-Ldebug_str # DW_AT_producer
48 .short 12 # DW_AT_language
50 .byte 2 # Abbrev [2] DW_TAG_subprogram
51 .long Lstring_main-Ldebug_str # DW_AT_name
53 .byte 0 # End Of Children Mark
56 .section __DWARF,__apple_names,regular,debug
58 .long 1212240712 ## Header Magic
59 .short 1 ## Header Version
60 .short 0 ## Header Hash Function
61 .long 1 ## Header Bucket Count
62 .long 1 ## Header Hash Count
63 .long 12 ## Header Data Length
64 .long 1 ## HeaderData Die Offset Base
65 .long 1 ## HeaderData Atom Count
66 .short 1 ## DW_ATOM_die_offset
67 .short 6 ## DW_FORM_data4
69 .long 2090499946 ## Hash in Bucket 0
70 .long LNames0-Lnames_begin ## Offset in Bucket 0
72 .long Lstring_main-Ldebug_str ## main
74 .long Ldie_main-Ldebug_info