[Lldb-commits] [PATCH] D54747: Discard debuginfo for object files empty after GC

Robert O'Callahan via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun Mar 24 18:37:33 PDT 2019

rocallahan added a comment.

Another clarification:

> DWARF type information currently shared between functions in the same CU would have to be duplicated.

I guess that's not necessary. The compiler could put all debuginfo that's shared between functions into a non-COMDAT section for the compilation unit. The downside of that is that that data is not removed by gc-sections ... although my patch here would remove it, if all functions in the CU are removed.

I guess this is what @echristo was getting at in their comment above:

In D54747#1319447 <https://reviews.llvm.org/D54747#1319447>, @echristo wrote:

> There's a few options here, mostly using comdat groups for debug infomation associated with sections that the debug information comes from. That said, it still wouldn't encompass compile units that would have no code in them because we didn't choose a single function from a .o file and so this patch is still a strict improvement over that. In addition, it doesn't involve future work to change how we emit debug info and doesn't depend on everyone emitting debug info the same way.

  rLLD LLVM Linker



More information about the lldb-commits mailing list