3 ; RUN: mkdir -p %t/objects/o1
4 ; RUN: mkdir -p %t/objects/o2
7 ; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-output-dir-same-name-main.s \
8 ; RUN: -split-dwarf-file=objects/o1/split.dwo -o main.o
9 ; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-output-dir-same-name-helper.s \
10 ; RUN: -split-dwarf-file=objects/o2/split.dwo -o helper.o
11 ; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
12 ; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --dwarf-output-path=%t/dwo
13 ; RUN: ls -l %t/dwo > log
14 ; RUN: llvm-dwarfdump --debug-info main.exe.bolt >> log
15 ; RUN: cat log | FileCheck -check-prefix=BOLT %s
17 ; Tests that BOLT handles correctly writing out .dwo files to the same directory when input has input where part of path
18 ; is in DW_AT_dwo_name and the .dwo file names are the same.
20 ; BOLT: split.dwo0.dwo
21 ; BOLT: split.dwo1.dwo
22 ; BOLT: DW_AT_dwo_name ("split.dwo0.dwo")
23 ; BOLT: DW_AT_dwo_name ("split.dwo1.dwo")
25 ; Tests that when --dwarf-output-path is specified, but path do not exist BOLT creates it.
28 ; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --dwarf-output-path=%t/dwo
29 ; RUN: ls -l %t/dwo > log
30 ; RUN: llvm-dwarfdump --debug-info main.exe.bolt >> log
31 ; RUN: cat log | FileCheck -check-prefix=BOLT1 %s
33 ; Tests that BOLT handles correctly writing out .dwo files to the same directory when input has input where part of path
34 ; is in DW_AT_dwo_name and the .dwo file names are the same.
36 ; BOLT1: split.dwo0.dwo
37 ; BOLT1: split.dwo1.dwo
38 ; BOLT1: DW_AT_dwo_name ("split.dwo0.dwo")
39 ; BOLT1: DW_AT_dwo_name ("split.dwo1.dwo")