16d4aa9d7SAlexander Yermolovich; RUN: rm -rf %t 26d4aa9d7SAlexander Yermolovich; RUN: mkdir %t 36d4aa9d7SAlexander Yermolovich; RUN: cd %t 46d4aa9d7SAlexander Yermolovich; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-debug-names-ftu-ltu-mix-main.s \ 56d4aa9d7SAlexander Yermolovich; RUN: -split-dwarf-file=main.dwo -o main.o 66d4aa9d7SAlexander Yermolovich; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-debug-names-ftu-ltu-mix-helper.s -o helper.o 76d4aa9d7SAlexander Yermolovich; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-debug-names-ftu-ltu-mix-helper1.s -o helper1.o 86d4aa9d7SAlexander Yermolovich; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o helper1.o -o main.exe -fno-pic -no-pie 96d4aa9d7SAlexander Yermolovich; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --create-debug-names-section=true 106d4aa9d7SAlexander Yermolovich; RUN: llvm-dwarfdump --debug-names main.exe.bolt | FileCheck -check-prefix=BOLT %s 116d4aa9d7SAlexander Yermolovich 126d4aa9d7SAlexander Yermolovich;; Tests BOLT correctly sets foreign TU Index when there are local TUs. 136d4aa9d7SAlexander Yermolovich 146d4aa9d7SAlexander Yermolovich; BOLT: Compilation Unit offsets [ 156d4aa9d7SAlexander Yermolovich; BOLT-NEXT: CU[0]: {{.+}} 166d4aa9d7SAlexander Yermolovich; BOLT-NEXT: CU[1]: {{.+}} 176d4aa9d7SAlexander Yermolovich; BOLT-NEXT: CU[2]: {{.+}} 186d4aa9d7SAlexander Yermolovich; BOLT-NEXT: ] 196d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Local Type Unit offsets [ 206d4aa9d7SAlexander Yermolovich; BOLT-NEXT: LocalTU[0]: {{.+}} 216d4aa9d7SAlexander Yermolovich; BOLT-NEXT: LocalTU[1]: {{.+}} 226d4aa9d7SAlexander Yermolovich; BOLT-NEXT: ] 236d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Foreign Type Unit signatures [ 246d4aa9d7SAlexander Yermolovich; BOLT-NEXT: ForeignTU[0]: 0x889c84450dac881f 256d4aa9d7SAlexander Yermolovich; BOLT-NEXT: ] 266d4aa9d7SAlexander Yermolovich; BOLT: Name 3 { 276d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Hash: 0x6A05C500 286d4aa9d7SAlexander Yermolovich; BOLT-NEXT: String: {{.+}} "globalMono1" 296d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Entry @ {{.+}} { 306d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Abbrev: 0x5 316d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Tag: DW_TAG_variable 326d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_compile_unit: 0x02 336d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_die_offset: 0x0000001e 34*a4610c71SAlexander Yermolovich; BOLT-NEXT: DW_IDX_parent: <parent not indexed> 356d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 366d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 376d4aa9d7SAlexander Yermolovich; BOLT: Name 6 { 386d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Hash: 0xF283AF92 396d4aa9d7SAlexander Yermolovich; BOLT-NEXT: String: {{.+}} "ASplit" 406d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Entry @ {{.+}} { 416d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Abbrev: 0x7 426d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Tag: DW_TAG_structure_type 436d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_type_unit: 0x02 446d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_compile_unit: 0x00 456d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_die_offset: 0x00000021 46*a4610c71SAlexander Yermolovich; BOLT-NEXT: DW_IDX_parent: <parent not indexed> 476d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 486d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 496d4aa9d7SAlexander Yermolovich; BOLT: Name 7 { 506d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Hash: 0xF17F51F 516d4aa9d7SAlexander Yermolovich; BOLT-NEXT: String: {{.+}} "AMono" 526d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Entry @ {{.+}} { 536d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Abbrev: 0x4 546d4aa9d7SAlexander Yermolovich; BOLT-NEXT: Tag: DW_TAG_structure_type 556d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_type_unit: 0x00 566d4aa9d7SAlexander Yermolovich; BOLT-NEXT: DW_IDX_die_offset: 0x00000023 57*a4610c71SAlexander Yermolovich; BOLT-NEXT: DW_IDX_parent: <parent not indexed> 586d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 596d4aa9d7SAlexander Yermolovich; BOLT-NEXT: } 60