[lld] [lld][ELF] Add --debug-names to create merged .debug_names. (PR #86508)
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 15 13:55:38 PDT 2024
================
@@ -1,22 +1,29 @@
# 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 \
-# RUN: FileCheck -DFILE=%t1.o --implicit-check-not=error: %s
-
+# RUN: | FileCheck -DFILE=%t1.o --implicit-check-not=error: %s
+
# CHECK: error: [[FILE]]:(.debug_names): index entry is out of bounds
# CHECK: error: [[FILE]]:(.debug_names): index entry is out of bounds
# CHECK: error: [[FILE]]:(.debug_names): index entry is out of bounds
# CHECK: error: [[FILE]]:(.debug_names): index entry is out of bounds
-# This file was generated by first compiling main.cpp:
-# clang++ -g -O0 -S -gpubnames -fdebug-compilation-dir='debug-names-test' \
-# main.cpp
+# RUN: ld.lld --noinhibit-exec --debug-names %t1.o -o /dev/null 2>&1 \
+# RUN: | FileCheck -DFILE=%t1.o %s --check-prefix=WARN
+
+# WARN: warning: [[FILE]]:(.debug_names): index entry is out of bounds
----------------
dwblaikie wrote:
That does look like it'd reduce the verbosity/repetition, which I think is good.
But in this case I think they're equivalent errors ( https://en.wikipedia.org/wiki/Equivalence_class ) - different inputs that fail in the same way. I think it'd be fine to only test the class once.
https://github.com/llvm/llvm-project/pull/86508
More information about the llvm-commits
mailing list