39 lines · plain
1# REQUIRES: system-linux2 3# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-locexpr-referrence-main.s -o %tmain.o4# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-locexpr-referrence-helper.s -o %thelper.o5# RUN: %clang %cflags -dwarf-5 %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-info %t.bolt | FileCheck --check-prefix=CHECK %s8# RUN: llvm-dwarfdump --show-form --verbose --debug-addr %t.bolt | FileCheck --check-prefix=CHECKADDR %s9 10## This test checks that we update relative DIE references with DW_OP_convert that are in locexpr11## and checks the address table is correct.12 13# CHECK: version = 0x000514# CHECK: DW_TAG_variable15# CHECK-NEXT: DW_AT_location16# CHECK-SAME: DW_OP_convert (0x00000028 -> 0x00000028)17# CHECK-SAME: DW_OP_convert (0x0000002c -> 0x0000002c)18# CHECK: version = 0x000519# CHECK: DW_TAG_variable20# CHECK-NEXT: DW_AT_location21# CHECK-SAME: DW_OP_convert (0x00000028 -> 0x00000092)22# CHECK-SAME: DW_OP_convert (0x0000002c -> 0x00000096)23# CHECK: version = 0x000524 25# CHECKADDR: Addrs: [26# CHECKADDR-NEXT: 0x000000000000133027# CHECKADDR-NEXT: 0x000000000000000028# CHECKADDR-NEXT: 0x000000000000133329# CHECKADDR-NEXT: ]30# CHECKADDR: Addrs: [31# CHECKADDR-NEXT: 0x000000000000134032# CHECKADDR-NEXT: 0x000000000000000033# CHECKADDR-NEXT: 0x000000000000134334# CHECKADDR-NEXT: ]35# CHECKADDR: Addrs: [36# CHECKADDR-NEXT: 0x000000000000132037# CHECKADDR-NEXT: 0x000000000000000038# CHECKADDR-NEXT: ]39