[PATCH] D46850: [DebugInfo] Generate fixups as emitting DWARF .debug_line.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 2 09:08:41 PDT 2018


probinson added a comment.

I have spent a little time familiarizing myself with the fragment stuff, which prompts the inline questions.
If you agree with my point about not having two places to store the fragment contents, then I think the first step would be to do that NFC refactoring to change the base class, and follow that with the change to handle the fixups for fixed advance.



================
Comment at: include/llvm/MC/MCFragment.h:510
 
-class MCDwarfLineAddrFragment : public MCFragment {
+class MCDwarfLineAddrFragment : public MCEncodedFragmentWithFixups<32, 4> {
   /// LineDelta - the value of the difference between the two line numbers
----------------
These template parameters will reserve 32 bytes for the content of the fragment and 4 MCFixups.  Are these reasonable values?  I see there is a `SmallString<8> Contents;` field in this class already, and it would appear that each MCDwarfLineAddrFragment would have at most one fixup.
If the new parent class is going to reserve memory for the contents, it seems like there is some additional refactoring needed to avoid a pointless increase in memory consumption.


Repository:
  rL LLVM

https://reviews.llvm.org/D46850





More information about the llvm-commits mailing list