Home | History | Annotate | Download | only in ELF
      1 # REQUIRES: default_triple
      2 # RUN: llvm-mc -dwarf-version 5 %s -filetype=obj -o - | llvm-dwarfdump -debug-line - | FileCheck %s
      3 # RUN: not llvm-mc -dwarf-version 4 %s -filetype=asm -o - 2>&1 | FileCheck %s -check-prefix=ERR
      4 # Darwin line table is stuck on DWARF v2.
      5 # XFAIL: darwin
      6 # Show that ".loc 0" works in DWARF v5, gets an error for earlier versions.
      7         .file 0 "root.cpp"
      8         .file 1 "header.h"
      9 	.loc  0 10 0
     10         .byte 0
     11         .loc  1 20 0
     12         .byte 0
     13 
     14 # CHECK:      file_names[ 0]:
     15 # CHECK-NEXT: name: "root.cpp"
     16 # CHECK:      file_names[ 1]:
     17 # CHECK-NEXT: name: "header.h"
     18 # CHECK:      Address Line Column File
     19 # CHECK-NEXT: -------
     20 # CHECK-NEXT: 0x{{[0-9a-f]+}} 10 0 0
     21 # CHECK-NEXT: 0x{{[0-9a-f]+}} 20 0 1
     22 # CHECK-NEXT: 0x{{[0-9a-f]+}} 20 0 1 {{.*}} end_sequence
     23 
     24 # ERR:      file number less than one in '.loc' directive
     25 # ERR-NEXT: .loc 0 10 0
     26 # ERR-NEXT: ^
     27