Higuoxing added inline comments.
================ Comment at: llvm/lib/ObjectYAML/DWARFEmitter.cpp:207-215 +static unsigned getOffsetSize(const DWARFYAML::Unit &Unit) { + return Unit.Format == dwarf::DWARF64 ? 8 : 4; +} - void onValue(const uint16_t U) override { - writeInteger(U, OS, DebugInfo.IsLittleEndian); - } +static unsigned getRefSize(const DWARFYAML::Unit &Unit) { + if (Unit.Version == 2) + return Unit.AddrSize; ---------------- labath wrote: > Maybe this is for a separate patch, since you're just moving these, but this > code already exists in BinaryFormat/Dwarf.h. It would be nice if > DWARFYaml::Unit had a dwarf::FormParams field or a getter, and then these > things could be retrieved by querying that object... Thanks! I'll do it in a separate patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84008/new/ https://reviews.llvm.org/D84008 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits