1# REQUIRES: default_triple
2# RUN: llvm-mc -dwarf-version 4 %s -filetype=obj -o - | llvm-dwarfdump -debug-line - | FileCheck %s --check-prefixes=CHECK,CHECK-4
3# RUN: llvm-mc -dwarf-version 4 %s -filetype=asm -o - | FileCheck %s --check-prefixes=ASM,ASM-4
4# RUN: llvm-mc -dwarf-version 4 %s -filetype=asm -o - 2>&1 | FileCheck %s --check-prefix=WARN
5# RUN: llvm-mc -dwarf-version 5 %s -filetype=obj -o - | llvm-dwarfdump -debug-line - | FileCheck %s --check-prefixes=CHECK,CHECK-5
6# RUN: llvm-mc -dwarf-version 5 %s -filetype=asm -o - | FileCheck %s --check-prefixes=ASM,ASM-5
7# Darwin is stuck on DWARF v2.
8# XFAIL: darwin
9        .file 0 "/test" "root.cpp"
10        .file 1 "/include" "header.h"
11        .file 2 "/test" "root.cpp"
12# CHECK-5:     include_directories[ 0] = "/test"
13# CHECK-4-NOT: include_directories[ 0]
14# CHECK:       include_directories[ 1] = "/include"
15# CHECK-4:     include_directories[ 2] = "/test"
16# CHECK-NOT:   include_directories
17# CHECK-4-NOT: file_names[ 0]
18# CHECK-5:     file_names[ 0]:
19# CHECK-5-NEXT: name: "root.cpp"
20# CHECK-5-NEXT: dir_index: 0
21# CHECK:       file_names[ 1]:
22# CHECK-NEXT:  name: "header.h"
23# CHECK-NEXT:  dir_index: 1
24# CHECK:       file_names[ 2]:
25# CHECK-NEXT:  name: "root.cpp"
26# CHECK-4-NEXT: dir_index: 2
27# CHECK-5-NEXT: dir_index: 0
28
29# ASM-NOT: .file
30# ASM-5:   .file 0 "/test" "root.cpp"
31# ASM:     .file 1 "/include" "header.h"
32# ASM-4:   .file 2 "/test" "root.cpp"
33# ASM-5:   .file 2 "root.cpp"
34# ASM-NOT: .file
35
36# WARN:      file 0 not supported prior to DWARF-5
37# WARN-NEXT: .file 0
38# WARN-NEXT: ^
39