[PATCH] D117441: [DwarfDebug] Restore code that make comments stay aligned in DwarfDebug::emitDebugLocEntry

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 17 11:42:16 PST 2022


bjope added a comment.

In D117441#3249162 <https://reviews.llvm.org/D117441#3249162>, @dblaikie wrote:

> This seems like a fairly subtle/long distance dependence now, that "emitDIERef" will use the same ULEB128PadSize as this code uses? Which isn't necessarily true/could become divergent relatively easily.

Yes, that could be true.

Honestly, I do not really know how it works with these comments. For example:

- How comes that we should skip (up-to) `ULEB128PadSize` comments for Encoding::BaseTypeRef? Why is it like that?
- Why are we just skipping comments and not printing them?

I was thinking that I could add a Twine argument to `emitDIERef` similarly to those found for `emitInt8`. But that felt weird since we just skip comments, not printing them. And I would need to pass the Iterator in order to step it multiple times.

Well, this patch simply restores the code needed to make our downstream test cases working again (we had some lit tests that used FileCheck lines to verify the debug section, including the comments, and those tests have been failing after commit 2bddab25dba8d4b0 <https://reviews.llvm.org/rG2bddab25dba8d4b0932dc2b6cacef13fcf8a0694> due to the comments being totally messed up).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117441/new/

https://reviews.llvm.org/D117441



More information about the llvm-commits mailing list