brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 0cb62ed Raw
58 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-basic-cu.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-types-no-cu.s -o %thelper.o5# RUN: %clang %cflags %tmain.o %thelper.o -o %t.exe -Wl,-q6# RUN: llvm-bolt %t.exe -o %t.bolt --update-debug-sections --debug-thread-count=4 --cu-processing-batch-size=47# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.exe | FileCheck -check-prefix=PRE-BOLT %s8# RUN: llvm-dwarfdump --show-form --verbose --debug-str-offsets %t.bolt | FileCheck -check-prefix=POST-BOLT %s9 10## This test checks we correctly re-generate .debug_str_offsets when there are type units that have an offset not shared with CU.11 12# PRE-BOLT: .debug_str_offsets contents13# PRE-BOLT-NEXT: Contribution size = 24, Format = DWARF32, Version = 514# PRE-BOLT-NEXT:  "clang version 18.0.0git (git@github.com:llvm/llvm-project.git 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873)"15# PRE-BOLT-NEXT:  "main.cpp"16# PRE-BOLT-NEXT:  "/home"17# PRE-BOLT-NEXT:  "main"18# PRE-BOLT-NEXT:  "int"19# PRE-BOLT-NEXT: Contribution size = 60, Format = DWARF32, Version = 520# PRE-BOLT-NEXT:  "clang version 18.0.0git (git@github.com:llvm/llvm-project.git 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873)"21# PRE-BOLT-NEXT:  "helper.cpp"22# PRE-BOLT-NEXT:  "/home"23# PRE-BOLT-NEXT:  "f1"24# PRE-BOLT-NEXT:  "a1"25# PRE-BOLT-NEXT:  "char"26# PRE-BOLT-NEXT:  "a2"27# PRE-BOLT-NEXT:  "a3"28# PRE-BOLT-NEXT:  "Foo1"29# PRE-BOLT-NEXT:  "f2"30# PRE-BOLT-NEXT:  "b1"31# PRE-BOLT-NEXT:  "int"32# PRE-BOLT-NEXT:  "b2"33# PRE-BOLT-NEXT:  "Foo2"34 35## Checking post bolt36# POST-BOLT: .debug_str_offsets contents37# POST-BOLT-NEXT: Contribution size = 60, Format = DWARF32, Version = 538# POST-BOLT-NEXT:  "clang version 18.0.0git (git@github.com:llvm/llvm-project.git 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873)"39# POST-BOLT-NEXT:  "helper.cpp"40# POST-BOLT-NEXT:  "/home"41# POST-BOLT-NEXT:  "f1"42# POST-BOLT-NEXT:  "a1"43# POST-BOLT-NEXT:  "char"44# POST-BOLT-NEXT:  "a2"45# POST-BOLT-NEXT:  "a3"46# POST-BOLT-NEXT:  "Foo1"47# POST-BOLT-NEXT:  "f2"48# POST-BOLT-NEXT:  "b1"49# POST-BOLT-NEXT:  "int"50# POST-BOLT-NEXT:  "b2"51# POST-BOLT-NEXT:  "Foo2"52# POST-BOLT-NEXT: Contribution size = 24, Format = DWARF32, Version = 553# POST-BOLT-NEXT:  "clang version 18.0.0git (git@github.com:llvm/llvm-project.git 44dc1e0baae7c4b8a02ba06dcf396d3d452aa873)"54# POST-BOLT-NEXT:  "main.cpp"55# POST-BOLT-NEXT:  "/home"56# POST-BOLT-NEXT:  "main"57# POST-BOLT-NEXT:  "int"58