[llvm] [BOLT][NFC] Add split-dwarf4 test with multiple CUs (PR #93741)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 17:01:41 PDT 2024


================
@@ -0,0 +1,97 @@
+; RUN: rm -rf %t
+; RUN: mkdir %t
+; RUN: cd %t
+; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-input-lowpc-ranges-main.s \
+; RUN: -split-dwarf-file=main.dwo -o main.o
+; RUN: llvm-mc -dwarf-version=4 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf4-df-input-lowpc-ranges-other.s \
+; RUN: -split-dwarf-file=mainOther.dwo -o other.o
+; RUN: %clang %cflags -gdwarf-4 -gsplit-dwarf=split main.o other.o -o main.exe
+; RUN: llvm-bolt main.exe -o main.exe.bolt --update-debug-sections
+; RUN: llvm-dwarfdump --show-form --verbose --debug-ranges main.exe.bolt &> %t/foo.txt
+; RUN: llvm-dwarfdump --show-form --verbose --debug-info main.exe.bolt >> %t/foo.txt
+; RUN: cat %t/foo.txt | FileCheck -check-prefix=BOLT %s
+; RUN: not llvm-dwarfdump --show-form --verbose --debug-info main.dwo.dwo mainOther.dwo &> %t/mainddwodwo.txt
----------------
ayermolo wrote:

Here you are checking pre-bolt mainOther.dwo
The output of BOLT is whatever is in the DW_AT_name and then .dwo added to it.
So for this it will be mainOther.dwo.dwo

https://github.com/llvm/llvm-project/pull/93741


More information about the llvm-commits mailing list