[PATCH] D84008: [DWARFYAML] Refactor emitDebugInfo() to make the length be inferred.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 07:49:39 PDT 2020


Higuoxing marked an inline comment as done.
Higuoxing added inline comments.


================
Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:380-382
+      cantFail(writeVariableSizedInteger(Unit.AbbrOffset,
+                                         Unit.Format == dwarf::DWARF64 ? 8 : 4,
+                                         OS, DI.IsLittleEndian));
----------------
jhenderson wrote:
> labath wrote:
> > a writeDwarfOffset function might be handy.
> I'm guessing the new function can be used elsewhere too (I expect in places like .debug_aranges for example). In another patch, please consider looking at that.
Yeah, it can be used in the .debug_str_offsets/debug_rnglists/debug_loclists/debug_aranges sections, etc. I've applied it in this patch and will apply it to other sections in a follow-up patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84008





More information about the llvm-commits mailing list