[lld] [lld][ELF] Implement merged .debug_names section. (PR #86508)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 25 22:12:13 PDT 2024


================
@@ -0,0 +1,153 @@
+# REQUIRES: x86
+# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t1.o
+#
+# RUN: not ld.lld --debug-names %t1.o -o /dev/null 2>&1 | FileCheck %s
+#
+# CHECK: error: {{.*}}:(.debug_names): encountered unexpected end of section while reading entry
----------------
MaskRay wrote:

We should test the filename to ensure it is correct.

You can use `FileCheck -DFILE=%t1.o` to get the filename with `[[FILE]]`. Recently, more tests have `rm -rf %t && split-file %s %t && cd %t` so that we don't need to figure out slashes/backslashes for non-Windows/Windows.

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


More information about the llvm-commits mailing list