[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / MC / ELF / dwarf-loc0.s
blobe2d279c83bc575e00a6348e1a2e5889d7dd95dd0
1 # UNSUPPORTED: -zos
2 # REQUIRES: default_triple
3 # RUN: llvm-mc -dwarf-version 5 --defsym FILE0=1 %s -filetype=obj -o - | llvm-dwarfdump -debug-line - | FileCheck %s
4 # RUN: not llvm-mc -dwarf-version 4 %s -filetype=asm -o - 2>&1 | FileCheck %s -check-prefix=ERR
5 # Show that ".loc 0" works in DWARF v5, gets an error for earlier versions.
6 .ifdef FILE0
7 .file 0 "root.cpp"
8 .endif
9 .file 1 "header.h"
10 .loc 0 10 0
11 .byte 0
12 .loc 1 20 0
13 .byte 0
15 # CHECK: file_names[ 0]:
16 # CHECK-NEXT: name: "root.cpp"
17 # CHECK: file_names[ 1]:
18 # CHECK-NEXT: name: "header.h"
19 # CHECK: Address Line Column File
20 # CHECK-NEXT: -------
21 # CHECK-NEXT: 0x{{[0-9a-f]+}} 10 0 0
22 # CHECK-NEXT: 0x{{[0-9a-f]+}} 20 0 1
23 # CHECK-NEXT: 0x{{[0-9a-f]+}} 20 0 1 {{.*}} end_sequence
25 # ERR: file number less than one in '.loc' directive
26 # ERR-NEXT: .loc 0 10 0
27 # ERR-NEXT: ^