brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · 3a0260f Raw
60 lines · plain
1; RUN: rm -rf %t2; RUN: mkdir %t3; RUN: cd %t4; RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-df-debug-names-ftu-ltu-mix-main.s \5; RUN: -split-dwarf-file=main.dwo -o main.o6; 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.o7; 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.o8; RUN: %clang %cflags -gdwarf-5 -gsplit-dwarf=split main.o helper.o helper1.o -o main.exe -fno-pic -no-pie9; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections --create-debug-names-section=true10; RUN: llvm-dwarfdump --debug-names main.exe.bolt | FileCheck -check-prefix=BOLT %s11 12;; Tests BOLT correctly sets foreign TU Index when there are local TUs.13 14; BOLT:        Compilation Unit offsets [15; BOLT-NEXT:     CU[0]: {{.+}}16; BOLT-NEXT:     CU[1]: {{.+}}17; BOLT-NEXT:     CU[2]: {{.+}}18; BOLT-NEXT:   ]19; BOLT-NEXT:   Local Type Unit offsets [20; BOLT-NEXT:     LocalTU[0]: {{.+}}21; BOLT-NEXT:     LocalTU[1]: {{.+}}22; BOLT-NEXT:   ]23; BOLT-NEXT:   Foreign Type Unit signatures [24; BOLT-NEXT:     ForeignTU[0]: 0x889c84450dac881f25; BOLT-NEXT:   ]26; BOLT:        Name 3 {27; BOLT-NEXT:     Hash: 0x6A05C50028; BOLT-NEXT:     String: {{.+}} "globalMono1"29; BOLT-NEXT:     Entry @ {{.+}} {30; BOLT-NEXT:       Abbrev: 0x531; BOLT-NEXT:       Tag: DW_TAG_variable32; BOLT-NEXT:       DW_IDX_compile_unit: 0x0233; BOLT-NEXT:       DW_IDX_die_offset: 0x0000001e34; BOLT-NEXT:       DW_IDX_parent: <parent not indexed>35; BOLT-NEXT:     }36; BOLT-NEXT:   }37; BOLT:        Name 6 {38; BOLT-NEXT:     Hash: 0xF283AF9239; BOLT-NEXT:     String: {{.+}} "ASplit"40; BOLT-NEXT:     Entry @ {{.+}} {41; BOLT-NEXT:       Abbrev: 0x742; BOLT-NEXT:       Tag: DW_TAG_structure_type43; BOLT-NEXT:       DW_IDX_type_unit: 0x0244; BOLT-NEXT:       DW_IDX_compile_unit: 0x0045; BOLT-NEXT:       DW_IDX_die_offset: 0x0000002146; BOLT-NEXT:       DW_IDX_parent: <parent not indexed>47; BOLT-NEXT:     }48; BOLT-NEXT:   }49; BOLT:        Name 7 {50; BOLT-NEXT:     Hash: 0xF17F51F51; BOLT-NEXT:     String: {{.+}} "AMono"52; BOLT-NEXT:     Entry @ {{.+}} {53; BOLT-NEXT:       Abbrev: 0x454; BOLT-NEXT:       Tag: DW_TAG_structure_type55; BOLT-NEXT:       DW_IDX_type_unit: 0x0056; BOLT-NEXT:       DW_IDX_die_offset: 0x0000002357; BOLT-NEXT:       DW_IDX_parent: <parent not indexed>58; BOLT-NEXT:     }59; BOLT-NEXT:   }60