xref: /llvm-project/bolt/test/X86/dwarf5-df-dualcu-loclist.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
1ba1ac98cSAlexander Yermolovich; RUN: rm -rf %t
2ba1ac98cSAlexander Yermolovich; RUN: mkdir %t
3ba1ac98cSAlexander Yermolovich; RUN: cd %t
4e51a6b73Szr33; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-loclist-main.s \
5e51a6b73Szr33; RUN: -split-dwarf-file=main.dwo -o main.o
6e51a6b73Szr33; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-dualcu-loclist-helper.s \
7e51a6b73Szr33; RUN: -split-dwarf-file=helper.dwo -o helper.o
8ba1ac98cSAlexander Yermolovich; RUN: %clang %cflags -gdwarf-5 -O2 -gsplit-dwarf=split main.o helper.o -o main.exe
9ba1ac98cSAlexander Yermolovich; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
10ba1ac98cSAlexander Yermolovich; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-MAIN %s
11ba1ac98cSAlexander Yermolovich; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-MAIN %s
12ba1ac98cSAlexander Yermolovich; RUN: llvm-dwarfdump --show-form --verbose --debug-info helper.dwo | FileCheck -check-prefix=PRE-BOLT-DWO-HELPER %s
13ba1ac98cSAlexander Yermolovich; RUN: llvm-dwarfdump --show-form --verbose --debug-info helper.dwo.dwo | FileCheck -check-prefix=BOLT-DWO-HELPER %s
14ba1ac98cSAlexander Yermolovich
15*11791ae7SSayhaan Siddiqui;; Testing dwarf5 split dwarf for two CUs. Making sure DW_AT_location [DW_FORM_loclistx] is updated correctly.
16ba1ac98cSAlexander Yermolovich
17ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN: version = 0x0005
18ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN: DW_TAG_formal_parameter [10]
19ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0) loclist = 0x00000014:
20ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_base_addressx   (0x0000000000000002)
21ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000010, 0x0000000000000024)
22ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000024, 0x0000000000000029)
23ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN: DW_TAG_formal_parameter [10]
24ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x1) loclist = 0x00000024:
25ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_base_addressx   (0x0000000000000002)
26ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000010, 0x000000000000001c)
27ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x000000000000001c, 0x0000000000000029)
28ba1ac98cSAlexander Yermolovich
29ba1ac98cSAlexander Yermolovich; BOLT-DWO-MAIN: version = 0x0005
30ba1ac98cSAlexander Yermolovich; BOLT-DWO-MAIN: DW_TAG_formal_parameter [10]
31ba1ac98cSAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0) loclist = 0x00000014:
3275f770a6SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_base_addressx   (0x0000000000000003)
33124ca880SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000000, 0x0000000000000014)
34124ca880SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000014, 0x0000000000000019)
35ba1ac98cSAlexander Yermolovich; BOLT-DWO-MAIN: DW_TAG_formal_parameter [10]
36124ca880SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x1) loclist = 0x00000024:
3775f770a6SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_base_addressx   (0x0000000000000003)
38124ca880SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x0000000000000000, 0x000000000000000c)
39124ca880SAlexander Yermolovich; BOLT-DWO-MAIN-NEXT: DW_LLE_offset_pair     (0x000000000000000c, 0x0000000000000019)
40ba1ac98cSAlexander Yermolovich
41ba1ac98cSAlexander Yermolovich
42ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER: version = 0x0005
43ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER: DW_TAG_formal_parameter [5]
44ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0) loclist = 0x00000010:
45ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER-NEXT: DW_LLE_base_addressx   (0x0000000000000002)
46ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER-NEXT: DW_LLE_offset_pair     (0x0000000000000000, 0x0000000000000008)
47ba1ac98cSAlexander Yermolovich; PRE-BOLT-DWO-HELPER-NEXT: DW_LLE_offset_pair     (0x0000000000000008, 0x000000000000001e)
48ba1ac98cSAlexander Yermolovich
49ba1ac98cSAlexander Yermolovich; BOLT-DWO-HELPER: version = 0x0005
50ba1ac98cSAlexander Yermolovich; BOLT-DWO-HELPER: DW_TAG_formal_parameter [5]
51ba1ac98cSAlexander Yermolovich; BOLT-DWO-HELPER-NEXT: DW_AT_location [DW_FORM_loclistx] (indexed (0x0) loclist = 0x00000010:
52124ca880SAlexander Yermolovich; BOLT-DWO-HELPER-NEXT: DW_LLE_base_addressx   (0x0000000000000002)
53124ca880SAlexander Yermolovich; BOLT-DWO-HELPER-NEXT: DW_LLE_offset_pair     (0x0000000000000000, 0x0000000000000008)
54124ca880SAlexander Yermolovich; BOLT-DWO-HELPER-NEXT: DW_LLE_offset_pair     (0x0000000000000008, 0x000000000000001e)
55