58 lines · plain
1// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -g -dwarf-version 4 -o %t %s2// RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s --check-prefixes=CHECK,DWARF43 4// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -g -dwarf-version 5 -o %t %s5// RUN: llvm-dwarfdump -debug-info -debug-line %t | FileCheck %s --check-prefixes=CHECK,DWARF56 7// CHECK: DW_TAG_compile_unit8// CHECK-NOT: DW_TAG_9// CHECK: DW_AT_name ("/MyTest/Inputs{{(/|\\)+}}other.S")10// CHECK: DW_TAG_label11// 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: 118 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: 024// 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.o27// RUN: llvm-dwarfdump -debug-info -debug-line %t.4.o | FileCheck %s --check-prefixes=MAP,MAP_V428// RUN: llvm-mc -triple=x86_64 -filetype=obj -g -dwarf-version=5 -fdebug-prefix-map=/MyTest=/src_root %s -o %t.5.o29// RUN: llvm-dwarfdump -debug-info -debug-line %t.5.o | FileCheck %s --check-prefixes=MAP,MAP_V530 31// MAP-LABEL: DW_TAG_compile_unit32// MAP: DW_AT_name ("/src_root/Inputs{{(/|\\)+}}other.S")33// MAP-LABEL: DW_TAG_label34// 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: 140 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: 045 46// RUN: llvm-mc -triple x86_64-unknown-linux-gnu -filetype obj -o %t %s47// RUN: llvm-readelf --sections %t | FileCheck %s --check-prefix=CHECK-NO-DEBUG48 49// CHECK-NO-DEBUG: Section Headers:50// CHECK-NO-DEBUG-NOT: .debug_51 52# 1 "/MyTest/Inputs/other.S"53 54foo:55 nop56 nop57 nop58