[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 14:49:28 PDT 2024


================
@@ -1,10 +1,10 @@
-# This file was generated by first compiling main.cpp:
-# clang++ -g -O0 -S -gpubnames -fdebug-compilation-dir='debug-names-test' \
-#      main.cpp
+# This file was generated by first compiling a.cpp:
+# clang++ -g -O0 -S -gpubnames -fdebug-compilation-dir='/proc/self/cwd' a.cpp
+
 # Then manually edit the .debug_names section. In the entries, change the
 # size of the DW_IDX_die_offset from '.long' to '.byte'.
 
-# Contents of main.cpp:
+# Contents of a.cpp:
 # int main (int argc, char **argv) { }
----------------
dwblaikie wrote:

I might get around to cleaning this up in a follow-up (out of curiosity, I found the difference between `int main() { }` built with `-g -gpubnames` and `int main(int argc, char** argv) { }` is 279 lines for the latter, 211 lines for the former - figured it might be worse, but still a substantial reduction) - yeah, perhaps revisiting the tests with the sed pattern @MaskRay has pointed to would be an opportunity to reduce the duplication further, and only have to regenerate one, or at least fewer, tests.

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


More information about the llvm-commits mailing list