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