1// RUN: llvm-mc -triple x86_64-unknown-unknown -dwarf-version 5 -filetype=obj %s -o -| llvm-dwarfdump --debug-line --debug-line-str -v - | FileCheck %s 2 3 .file 1 "dir1/foo" source "void foo() {}" 4 .file 2 "dir2" "bar" source "void bar()\n{\n}" 5 .loc 1 1 0 6 nop 7 .loc 2 1 0 8 nop 9 10# CHECK: debug_line[0x00000000] 11# CHECK: version: 5 12# CHECK: include_directories[ 0] = .debug_line_str[0x[[DIR0:[0-9a-f]+]]] = "{{.+}}" 13# CHECK: include_directories[ 1] = .debug_line_str[0x[[DIR1:[0-9a-f]+]]] = "dir1" 14# CHECK: include_directories[ 2] = .debug_line_str[0x[[DIR2:[0-9a-f]+]]] = "dir2" 15# CHECK-NOT: include_directories 16# CHECK: file_names[ 0]: 17# CHECK-NEXT: name: .debug_line_str[0x[[FILE0:[0-9a-f]+]]] = "foo" 18# CHECK-NEXT: dir_index: 1 19# CHECK-NEXT: source: .debug_line_str[0x[[FILE0SRC:[0-9a-f]+]]] = "void foo() {}" 20# CHECK: file_names[ 1]: 21# CHECK-NEXT: name: .debug_line_str[0x[[FILE0]]] = "foo" 22# CHECK-NEXT: dir_index: 1 23# CHECK-NEXT: source: .debug_line_str[0x[[FILE0SRC]]] = "void foo() {}" 24# CHECK: file_names[ 2]: 25# CHECK-NEXT: name: .debug_line_str[0x[[FILE2:[0-9a-f]+]]] = "bar" 26# CHECK-NEXT: dir_index: 2 27# CHECK-NEXT: source: .debug_line_str[0x[[FILE2SRC:[0-9a-f]+]]] = "void bar()\n{\n}" 28 29# CHECK: .debug_line_str contents: 30# CHECK-NEXT: 0x[[DIR0]]: "{{.+}}" 31# CHECK-NEXT: 0x[[DIR1]]: "dir1" 32# CHECK-NEXT: 0x[[DIR2]]: "dir2" 33# CHECK-NEXT: 0x[[FILE0]]: "foo" 34# CHECK-NEXT: 0x[[FILE0SRC]]: "void foo() {}" 35# CHECK-NEXT: 0x[[FILE2]]: "bar" 36# CHECK-NEXT: 0x[[FILE2SRC]]: "void bar()\n{\n}" 37