1# RUN: llvm-mc %s -filetype obj -triple x86_64-apple-darwin -o - \ 2# RUN: | not llvm-dwarfdump -verify - \ 3# RUN: | FileCheck %s 4 5# CHECK: Verifying .apple_names... 6# CHECK-NEXT: error: Unsupported form: 7 8# This test is meant to verify that the -verify option 9# in llvm-dwarfdump, correctly identifies that Atom[0].form is unsupported. 10# As a result, the hashdata cannot be read. 11 12 .section __TEXT,__text,regular,pure_instructions 13 .file 1 "basic.c" 14 .comm _i,4,2 ## @i 15 .comm _j,4,2 ## @j 16 .section __DWARF,__debug_str,regular,debug 17Linfo_string: 18 .asciz "Apple LLVM version 8.1.0 (clang-802.0.35)" ## string offset=0 19 .asciz "basic.c" ## string offset=42 20 .asciz "/Users/sgravani/Development/tests" ## string offset=50 21 .asciz "i" ## string offset=84 22 .asciz "int" ## string offset=86 23 .asciz "j" ## string offset=90 24 .section __DWARF,__debug_info,regular,debug 25Lsection_info: 26 .section __DWARF,__apple_names,regular,debug 27Lnames_begin: 28 .long 1212240712 ## Header Magic 29 .short 1 ## Header Version 30 .short 0 ## Header Hash Function 31 .long 2 ## Header Bucket Count 32 .long 2 ## Header Hash Count 33 .long 12 ## Header Data Length 34 .long 0 ## HeaderData Die Offset Base 35 .long 1 ## HeaderData Atom Count 36 .short 1 ## DW_ATOM_die_offset 37 .short 400 ## not a valid form -- error: unsupported form; failed to read HashData. 38 .long 0 ## Bucket 0 39 .long 1 ## Bucket 1 40 .long 177678 ## Hash in Bucket 0 41 .long 177679 ## Hash in Bucket 1 42 .long LNames0-Lnames_begin ## Offset in Bucket 0 43 .long LNames1-Lnames_begin ## Offset in Bucket 1 44LNames0: 45 .long 84 ## i 46 .long 1 ## Num DIEs 47 .long 30 48 .long 0 49LNames1: 50 .long 90 ## j 51 .long 1 ## Num DIEs 52 .long 58 53 .long 0 54 55.subsections_via_symbols 56 .section __DWARF,__debug_line,regular,debug 57Lsection_line: 58Lline_table_start0: 59