xref: /llvm-project/bolt/test/X86/dwarf5-df-types-dup-dwp-input.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
1; RUN: rm -rf %t
2; RUN: mkdir %t
3; RUN: cd %t
4; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-types-dup-main.s \
5; RUN: -split-dwarf-file=main.dwo -o main.o
6; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-types-dup-helper.s \
7; RUN: -split-dwarf-file=helper.dwo -o helper.o
8; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o -o main.exe
9; RUN: llvm-dwp -e main.exe -o main.exe.dwp
10; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
11; RUN: llvm-dwarfdump --debug-info -r 0 main.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-DWO-MAIN %s
12; RUN: llvm-dwarfdump --debug-info -r 0 helper.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-DWO-HELPER %s
13
14;; Tests that BOLT correctly handles DWARF5 DWP file as input. Output has correct CU, and all the type units are written out.
15
16; BOLT-DWO-DWO-MAIN: debug_info.dwo
17; BOLT-DWO-DWO-MAIN-NEXT: type_signature = 0x49dc260088be7e56
18; BOLT-DWO-DWO-MAIN: type_signature = 0x104ec427d2ebea6f
19; BOLT-DWO-DWO-MAIN: type_signature = 0xca1e65a66d92b970
20; BOLT-DWO-DWO-MAIN: Compile Unit
21; BOLT-DWO-DWO-MAIN-SAME: DWO_id = 0x52bda211bf6d26b7
22; BOLT-DWO-DWO-MAIN-NOT: Compile Unit
23; BOLT-DWO-DWO-HELPER: debug_info.dwo
24; BOLT-DWO-DWO-HELPER-NEXT: type_signature = 0x49dc260088be7e56
25; BOLT-DWO-DWO-HELPER: type_signature = 0x104ec427d2ebea6f
26; BOLT-DWO-DWO-HELPER: type_signature = 0xca1e65a66d92b970
27; BOLT-DWO-DWO-HELPER: Compile Unit
28; BOLT-DWO-DWO-HELPER-SAME: DWO_id = 0x1dbb67285a49634c
29; BOLT-DWO-DWO-HELPER-NOT: Compile Unit
30