1// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -g -dwarf-version 4 -o %t %s 2// RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s --check-prefixes=CHECK,DWARF4 3 4// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -g -dwarf-version 5 -o %t %s 5// RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s --check-prefixes=CHECK,DWARF5 6 7// CHECK: DW_TAG_compile_unit 8// CHECK-NOT: DW_TAG_ 9// CHECK: DW_AT_name ("/MyTest/Inputs{{(/|\\)+}}other.S") 10// CHECK: DW_TAG_label 11// CHECK-NOT: DW_TAG_ 12// CHECK: DW_AT_decl_file ("/MyTest/Inputs{{(/|\\)+}}other.S") 13 14// DWARF4: include_directories[ 1] = "/MyTest/Inputs" 15// DWARF4: file_names[ 1]: 16// DWARF4-NEXT: name: "other.S" 17// DWARF4-NEXT: dir_index: 1 18 19// DWARF5: include_directories[ 0] = 20// DWARF5-NOT: include_directories[ 1] = 21// DWARF5: file_names[ 0]: 22// DWARF5-NEXT: name: "/MyTest/Inputs/other.S" 23// DWARF5-NEXT: dir_index: 0 24// DWARF5-NOT: file_names[ 1]: 25 26// RUN: llvm-mc -triple=x86_64 -filetype=obj -g -dwarf-version=4 -fdebug-prefix-map=/MyTest=/src_root %s -o %t.4.o 27// RUN: llvm-dwarfdump -debug-info -debug-line %t.4.o | FileCheck %s --check-prefixes=MAP,MAP_V4 28// RUN: llvm-mc -triple=x86_64 -filetype=obj -g -dwarf-version=5 -fdebug-prefix-map=/MyTest=/src_root %s -o %t.5.o 29// RUN: llvm-dwarfdump -debug-info -debug-line %t.5.o | FileCheck %s --check-prefixes=MAP,MAP_V5 30 31// MAP-LABEL: DW_TAG_compile_unit 32// MAP: DW_AT_name ("/src_root/Inputs{{(/|\\)+}}other.S") 33// MAP-LABEL: DW_TAG_label 34// MAP: DW_AT_decl_file ("/src_root/Inputs{{(/|\\)+}}other.S") 35 36// MAP_V4: include_directories[ 1] = "/src_root/Inputs" 37// MAP_V4-NEXT: file_names[ 1]: 38// MAP_V4-NEXT: name: "other.S" 39// MAP_V4-NEXT: dir_index: 1 40 41// MAP_V5: include_directories[ 0] = "{{.*}}" 42// MAP_V5-NEXT: file_names[ 0]: 43// MAP_V5-NEXT: name: "/src_root/Inputs/other.S" 44// MAP_V5-NEXT: dir_index: 0 45 46# 1 "/MyTest/Inputs/other.S" 47 48foo: 49 nop 50 nop 51 nop 52